On Sun, Jun 17, 2012 at 1:56 AM, Roland Mainz <[email protected]> wrote: > On Wed, Apr 18, 2012 at 5:27 PM, David Korn <[email protected]> wrote: >> cc: [email protected] >> Subject: Re: [ast-users] [ksh93] Pathname auto completion: no need to prompt >> users to choose if there's no ambiguity >> -------- >> >>> $ echo ${.sh.version} >>> Version JMP 93u+ 2012-02-29 >>> $ ls -F >>> dir123/ dir321/ >>> $ set -o emacs >>> $ cd d<TAB> <== When I press <TAB> it auto completes `d' to `dir'. This >>> is fine. >>> $ cd dir >>> $ cd dir3<TAB> <== Then I enter 3 and press <TAB> again. Here I want it >>> to auto complete as `dir321' and then I can press <ENTER>. >>> $ cd dir3 >>> 1) dir321/ <== But it shows this out and let me choose. >>> $ cd dir3 <== Here I have to press 1<TAB> to have it complete to >>> `dir321', which is a bit annoying. >>> >>> The `vi' edit mode behaves the same. >>> >> >> Fixed for the next update. > > Erm... something is broken since this change: > 1. If I hit <tab> to complete a filename and get a list of choices for > the 2nd <tab> then sometimes entering a number to pick the selection > doesn't work. IMO if a selection menu is active (e.g. was just > presented) then the menu number should have precedence over the plain > filename completion > 2. IMO it would be nice that a <tab><tab> doesn't display a list of > choices with only one entry... IMO it should just auto-complete to > just that single entry (it's a bit frustrating if you walk a long list > of directories like > foo/bar/chicken/monster/illegal/downloads/of/terror/plans/including/chocolade/blabla/ > which only contain one child directory each. In bash4 I can just use > <tab> to move quickly up the (directory) ladder while > ast-ksh.2012-06-12 presents menus in each step... ;-/ )
To clarify point 1: There are two modes: a) The selection menu is not active and b) the selection menu is active. IMO the selection menu (and therefore selection of entries using numbers/digits) should only become active when the user does a <tab><tab> and it should stay active as long only numbers/digits are entered or a <tab> is pressed to re-display the menu (even multiple times!). The selection menu mode should be left if either the user names a choice via picking an entry via [[:digit:]]<enter>, entering a non-digit character or starts editing the text (e.g. <del> or <backspace>) or uses the cursor keys. AFAIK the the original issue Clark had was that the menu selection became active after the first <tab>, e.g. before any menu has been displayed... right ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
