Subject: Re: bin/4167: WIBNI sh supported file/command/etc completion?
To: Ty Sarna <email@example.com>
From: Luke Mewburn <firstname.lastname@example.org>
Date: 09/27/1997 14:47:50
Ty Sarna writes:
> Todd Vierling wrote:
> > : >How-To-Repeat:
> > : Wish /bin/sh supported tab completion of command names, file
> > : names, variable names, etc, like bash.
> > sh needs to be as lean and mean as possible, IMHO. It's the shell used by
> > your average Un*x script, so adding filename completion, line editing, blah
> > blah would add Feeping Creaturism to sh. sh is also _statically_ linked
> Uh... what do you mean *adding* line editing? It already uses libedit.
> The additional cost of adding completion should be small.
My issue (as the implementor of completion in ftp(1)) would be: how
far do you go? csh(1) supports filename completion, but if you want
fancy programmable completion you use tcsh(1) (e.g, context sensitive
completion on files, variables, etc, etc, etc).
As a lark, I could probably add non-context sensitive filename completion
into sh(1) at some stage. However, libedit(3) needs a little bit of
work (I need to add one extra feature) to provide better feedback to
the user in the case of an ambiguous match.
ObFTP: the completion in ftp(1) is context sensitive; the selection
between local or remote completion is made depending upon the command
and the argument number within the command. So
completes foo remotely, and
get foo bar<tab>
completes bar locally...