Post by @paul
oksh.@silverwizard@convenient.email @paul@paulwilde.uk brilliant! It's what I've been using myself recently.
@paul Obligatory not a developer, but I tend to use the default on the OS I'm using at the time. Bash on Void Linux and Haiku, ksh on OpenBSD, sh on NetBSD.
Sorry if that answer is boring and unhelpful, but I've dabbled with "new hotness" shells like fish and dash, and I just don't find them comfortable. I can't explain it, I guess I'm just too used to the old faithfuls.
@kaidenshi@exquisite.social @paul@paulwilde.uk not at all! Very good answer as it is exactly the thing I'm hitting all the time...the quirks of each shell when connecting in to different hosts.
I'm just trying to find "the one" - simple, but functional, and I can deploy a simple configuration file and be satisfied it will work everywhere.
Ksh (in oksh form) is looking like the best fit so far
Fish is eliminated from my enquiries...I have suffered too much pain in that shell ๐
@paul In that case I'd say ksh or just plain sh, that way you avoid gotchas and weirdness. In my experience, ksh is just enough of an extension of sh to be helpful without being ornery or doing unexpected things.
I don't code for a living, but part of being a sysadmin is writing scripts, and I've found that just writing plain old sh scripts without relying on bash or other shell -isms gets me where I need to be most of the time. But again, my needs are simple so I stay simple. The extended and more featureful shells do serve a purpose for those who need them.
@kaidenshi@exquisite.social @paul@paulwilde.uk sysadmin here too, and I also script in sh
Question is more for interactive use.
I would use just plain sh, but, as I use Alpine which uses busybox I don't have the same variant as other places, and it's just a bit too limiting.
Ksh is feeling like the best bet for sure.
Had some success with csh too, but ksh is nicer
@paul I don't recall what it was about csh that I didn't like compared to ksh but for many years now I've preferred the latter.
@paul `zsh`. `fish` does looks interesting but I don't find the motivation (yet, maybe each's respective AI stance will push me over)
@gwenhael@mastodon.sdf.org @paul@paulwilde.uk been using zsh for years, but for reasons I fancy a change
Fish is horrible (in my humble opinion!)
@paul eshell in emacs. Completion is unparalleled. I can pipe into emacs buffers. I can freely move the cursor for copy/paste and search.
@paul I use mksh as my prompt, as it has an anti-AI policy (unlike ksh93). However, I may switch to oksh (I use OpenBSD), since it's there; or I might explore other shells, like tcsh.
For scripting, I use different shells in an order or priority, depending on which features I need or who I expect to be running the script:
1. POSIX sh (sh, dash, ash, etc.)
2. oksh (or the default ksh)
3. mksh
4. Bash
5. Tclsh/wish
6. (on into non-shell scripting languages from this point)
I think most POSIX shell implementation feature a history command and line editing modes with history (set -o emacs and set -o vi), but I don't think all of them do.
This is why I tend to use bash for interactive use, and POSIX for scripting. ;)
Also, on BSD, ksh is a solid interactive shell. Particularly mksh (available in ports and packages).
@passthejoe @paul There is history in #netbsd #sh. Uparrow.
You may use the sysvar HISTFILE to achieve persistence across invocations.
'man sh' is quite detailed.
I don't use the sysvar. This means history starts over with each invocation. That works for me :)
@passthejoe @arosano @paul For sh on #NetBSD to have command-line editing, history and tab-complete you need to have the right dotfiles in your home dir. If you have a manually-made home dir they might be missing. Copy the contents of /etc/skel into ~ and then it'll work as expected.

๐ต 