/bin/sh is what? Can I set tab autocompletion for that sh?

Matthew Seaman matthew at FreeBSD.org
Wed Aug 26 18:12:40 UTC 2020


On 26/08/2020 17:37, Arthur Chance wrote:
> On 26/08/2020 17:09, 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.
>>
>> Errr...
>>
>> `set -o emacs`  or `set -E`
>>
>> will enable tab completion in /bin/sh, along with various other
>> comman-line editing features.
> 
> 
> Are you sure of that? If I drop into sh it's got emacs style editing for
> the command line but tab completion always gives me matching files in
> the current directory even in the command position. This is 11.3 (and I
> know I need to upgrade :-)
> 

Yes.  It is just tab completion of filenames -- nothing more
sophisticated than that I'm afraid.  /bin/sh hasn't changed
significantly since 11.3 release, so while upgrading might be a good
idea, this isn't the most compelling reason to do so.

	Cheers,

	Matthew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20200826/481cb15f/attachment.sig>


More information about the freebsd-questions mailing list