cc: roland.mainz at nrubsig.org
Subject: Re: TAB-TAB completion patch
--------
> 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.
> Roland,
The original idea of changing TAB to behave like \E= makes
no sense. However, the idea of TAB-TAB make sense with the following
modifications:
1. It should work for vi as well as emacs.
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.
I will look into making these changes for ksh93r+.
David Korn
dgk at research.att.com