bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Completion list showed twice using "show-all-if-ambiguous" and "menu


From: rehanog
Subject: Re: Completion list showed twice using "show-all-if-ambiguous" and "menu-complete" together
Date: Fri, 5 Apr 2013 14:19:39 -0700 (PDT)
User-agent: G2/1.0

On Friday, April 5, 2013 9:59:11 PM UTC+2, Chet Ramey wrote:
> On 4/4/13 7:53 AM, address@hidden wrote:
> 
> > Hi,
> 
> > 
> 
> > Ubuntu 12.10,  Bash 4.2.37
> 
> > 
> 
> > With the following inputrc ([Ctrl-RightArrow] mapped to menu-complete):
> 
> > set show-all-if-ambiguous on
> 
> > "\e[1;5C": menu-complete             
> 
> > 
> 
> > Actual Behaviour
> 
> > ----------------
> 
> > 
> 
> > # Type 'ls d'
> 
> > $ ls d
> 
> > 
> 
> > # Press <tab> key
> 
> > $ ls d
> 
> > desktop/  document/ dropbox/  
> 
> > $ ls d
> 
> > 
> 
> > # Press [Ctrl-RightArrow]
> 
> > $ ls d
> 
> > desktop/  document/ dropbox/  
> 
> > $ ls d
> 
> > desktop/  document/ dropbox/  
> 
> > $ ls desktop/
> 
> > 
> 
> > Desired Behaviour (differs only with last keypress only)
> 
> > --------------------------------------------------------
> 
> > # Press [Ctrl-RightArrow]
> 
> > $ ls d
> 
> > desktop/  document/ dropbox/  
> 
> > $ ls desktop/
> 
> 
> 
> This is how bash-4.3 will work: the list of possible completions is
> 
> displayed, then the first from the list is inserted without any
> 
> intervening keystrokes required.  The display will look pretty much
> 
> like your desired behavior with only one keypress required.
> 
> 
> 
> Chet
> 
> 
> 
> -- 
> 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> 
>                ``Ars longa, vita brevis'' - Hippocrates
> 
> Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Hi,

Thanks for the answer. However I can already achieve the behaviour you describe 
by adding the following to my previously described inputrc:
TAB: menu-complete

I would like not to have to do that - I like the way that with my current 
inputrc binding as listed in my first post, completion just stops at the common 
prefix when I hit tab. So with the same directory listing in the example above 
I can do the following:
# Type 'ls d'
$ls d
desktop/  document/ dropbox/  
$ ls d

# Type 'o', then press <TAB>
$ ls d
desktop/  document/ dropbox/  
$ ls document/

I would like the choice between the completion mechanism I used in my first 
post (manually cycling through completion options), and the completion 
mechanism in this post (typing extra characters onto the common prefix and then 
completing again).

In any case, the behaviour I described in my first post still seems like a bug. 
I don't see why, under any circumstances, it make sense for bash to display the 
same completion list twice.

Many thanks,

Rehan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]