-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ksh compatibility #608
Comments
Here is what I have found so far:
I'm not convinced that this is worth it. If there was user interest in Ksh support I would go for it, but as it stands, Ksh users might have to loose out on some of the advanced features of Liquidprompt. I won't throw away the shell testing script I built for this, and I'll leave this issue open for user feedback. But for now I'm shelving this idea. |
I think this hope has hit a dead end. While trying to port my latest Liquidprompt 2.1 develop branch to Ksh, I discovered a quirk of how it does local variables. (I say quirk, but it is actually more standard in programing to do it this way than how Bash and Zsh do it). $ function foo {
typeset var="foo"
bar
echo "$var"
}
$ function bar {
var="bar"
}
$ foo
foo
$ echo "$var"
bar Function Since there was never any interest in porting to Ksh besides my own masochistic purposes, I am canceling this. |
This issue is to log research and work done to make Liquidprompt compatible with more shells.
Right now, Liquidprompt claims to work with Bash and Zsh only, which it does well. There are no trackers in Liquidprompt, so there is no way to know the Bash/Zsh user share, but I would guess that the Bash user share is higher (since Zsh users often prefer Oh My Zsh), and quick scan of self reporting from the issues would back that up.
Since (hopefully) a stronger test suite will be coming soon, it makes sense to evaluate what other shells Liquidprompt can support without extra work.
Classic Bourne shell should be out, since it's so hard to find now and doesn't support POSIX.
POSIX shells like ash and its derivative dash are unlikely to be good ideas, since they try to stick closely to the POSIX standard. This is good for speed, but ironically, since they ship with less features, many of our tests and checks would have to fork out to
awk
orsed
, which would actually be slower. They are also not designed to be used as login shells, so it's probably not a good idea anyway.Ksh is a possible candidate though. While ksh93 is obviously from 1993, it has been patched since then to work on many systems, and it is the only shell that some systems ship with. There are also some derivatives (other than bash) like pdksh and mksh. While I don't personally like or use ksh, it seems that Liquidprompt could work in it with little modifications.
Input is welcome from all.
The text was updated successfully, but these errors were encountered: