I like mksh. No idea how POSIX it is.
test, I would conclude it is safe because the POSIX specification for test just states something like "anything else has undefined results", IIRC. But say it would require something like a diagnostic about "invalid" syntax, and you'd immediately have a compliance issue with your extension.Same reason why I was using /bin/tcsh and the % prompt character feeling cool than ordinary $. I like having a colored shell prompt but that doesn't look good when I do capture terminal output with script(1). I think I am seeing color codes in the typescript too, to workaround this, for now i have switched to /bin/sh and configured all my /bin/tcsh settings in both ~/.shrc and ~/.profile. I wonder if i can use tput(1) to color my shell prompt without messing the typescript.One of the reasons why I liked csh/tcsh was the way the history worked. It does a backwards search by default. Just type the first couple of characters of the command and press the <up> key, I am so used to that now.
if ( -X zsh && -f ~/.Use_zsh ) exec zsh
After I upgrade to FreeBSD 14.2 I changed from /bin/csh to /bin/sh. Is any way to make /bin/sh work with history and <up> key like csh?One of the reasons why I liked csh/tcsh was the way the history worked. It does a backwards search by default. Just type the first couple of characters of the command and press the <up> key, I am so used to that now. Bash can be configured similarly but doesn't feel the same and is certainly not configured by default that way. The original /bin/sh of FreeBSD had very little command history, certainly no persistent history. So tcsh was just a better interactive shell to use that was always available.
I had the problem because history worksAfter I upgrade to FreeBSD 14.2 I changed from /bin/csh to /bin/sh. Is any way to make /bin/sh work with history and <up> key like csh?
I think it does out of the box. Just started it, and the four cursor keys work fine.Is any way to make /bin/sh work with history and <up> key like csh?
For fresh installation or newly created user, yes. But existing user from before upgrade, no.I think it does out of the box. Just started it, and the four cursor keys work fine.
... and I have created my own color profile forFor everyday interactive use I prefer - shells/fish
fish. Not fully satisfied yet, but works for me. Can share if someone is interested.