[prev in list] [next in list] [prev in thread] [next in thread]
List: ast-users
Subject: [ast-users] Re: TAB-TAB completion patch
From: roland.mainz () nrubsig ! org (Roland Mainz)
Date: 2006-05-11 15:00:15
Message-ID: 44638986.E748BCE0 () nrubsig ! org
[Download RAW message or body]
David Korn wrote:
> > Roland Mainz wrote:
> > Actually it could be done better... attached is a 2nd patch
> > ("ksh93_tab_tab_gmacs_completion_try2.diff.txt") which also implements
> > TAB-TAB completion like in bash3.
> > Single TAB now completes the filename either completely - or if that
> > isn't possible it's completed to the point where the filenames start to
> > differ. TAB-TAB then displays a list of choices. Additionally in "gmacs"
> > mode typing TAB on an empty string will try to do the filename
> > completion for the whole directory (and TAB-TAB displays all choices
> > then). "emacs" mode still behaves as usual, incl. the ability to enter
> > the TAB character.
>
> The original idea of changing TAB to behave like \E= makes
> no sense.
Well, it makes sense for beginners as navigational help due lack of
better options. But I agree that there are better solutions - that's why
I wrote the 2nd patch... :-)
> However, the idea of TAB-TAB make sense with the following
> modifications:
>
> 1. It should work for vi as well as emacs.
And "gmacs" ...
BTW: Note that users expect that a TAB-TAB following a TAB-TAB
redisplays all choices (which means a TAB following a TAB-TAB cannot be
used to output a TAB, see below).
> 2. The second TAB should be mapped into \E= only when the completion
> did not complete a word. Otherwise, it should insert a TAB.
> 3. A TAB following a complete word should just insert a TAB.
Uhm... I am not sure whether this is a good idea. Sometimes uses want to
see all the entries of a directory (or to see all commands in ${PATH}
etc.) and type TAB-TAB intentionally in bash on an empty string. Maybe
"emacs" and "gmacs" mode should differ here: "emacs" mode insers a TAB
in the case, "gmacs" lists all matches for TAB-TAB on the empty string
(AFAIK that's the reason why bash displays multiple results per line for
"\E=").
> I will look into making these changes for ksh93r+.
That would be nice... :-)
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic