/bin/sh is what? Can I set tab autocompletion for that sh?
freebsd at edvax.de
Wed Aug 26 16:43:38 UTC 2020
On Wed, 26 Aug 2020 17:09:31 +0100, Matthew Seaman wrote:
> On 22/08/2020 08:40, Polytropon wrote:
> > On Sat, 22 Aug 2020 09:28:27 +0200, Christoph Kukulies wrote:
> >> I’m wondering whether I can set /bin/sh to autocomplete commands.
> > The regular sh shell (which is the Almquist shell) does not
> > have that feature. As it is primarily intended for scripting,
> > and used interactively only in emergency cases (and even there
> > often only to start csh or bash), command completition has
> > probably never been considered for implementation.
> > If you want this feature, just use csh, bash, zsh, ksh, fish,
> > depending on your individual shell preference.
> > See "man 1 sh" and "man 5 editrc" for details.
> `set -o emacs` or `set -E`
> will enable tab completion in /bin/sh, along with various other
> comman-line editing features.
Wow, this really works (on more recent versions of FreeBSD)!
I would never have associated this with emacs-style line editing.
Still the manual doesn't seem to mention tab completition;
however, the manual for editrc seems to at least _suggest_
that kind of functionality in two entries (one vi-, one em-),
even though it is not explicitely mentioned.
Enabling this particular feature makes /bin/sh more usable in
"worst case scenario" interactive shell sessions. ;-)
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions