On Tue, Mar 06, 2007 at 07:29:12AM EST, Florian Kulzer wrote: > On Tue, Mar 06, 2007 at 23:58:42 +1300, Chris Bannister wrote: > > On Sun, Mar 04, 2007 at 11:20:54PM -0800, Steve Lamb wrote: > > > cga2000 wrote: > > > > .. and as everybody will no doubt have noticed, ss/tt is one keystroke > > > > less than ss/*t* (not to mention the fact that the '*' is shifted and a > > > > little harder to reach). > > > > > > Ok, and now to point out the other glaringly obvious part of this > > > thread. > > > Care to share how you got bash to do that, in detail, since obviously > > > the OP > > > is missing some piece of information you've got? > > > > I *too* would like to know how bash can do that. Is zsh worth changing > > to just for that? Yeah, I know "apt-get install zsh-doc" :-) > > I was also surprised that bash can do this. I played around with it a > bit and found that my bash can do the "*xx*<tab>" completion only if I > do not source /etc/bash_completion. I have to choose between having the > "*xx*<tab>" completion behavior and having the handy features offered by > /etc/bash_completion. I use bash 3.1dfsg-8 on a Sid system. > > Can anybody confirm this? Is this a bug or a consequence of the way > /etc/bash_completion works? (I would expect that bash_completion is > supposed to add features without removing existing ones.)
Maybe the "problem" is caused by the use of <TAB> for two different mechanisms: 1. "completion" .. you type the first 0-n characters of an entity, hit <TAB> and bash will complete what you typed if only one match is found and beep otherwise. In the latter case you can issue a second <TAB> and bash will display the list of matches. This feature is programmable - ie. you can define completion rules to filter out entities that do not make sense in a given context. 2. "pathname expansion": you use special characters and .. optionally literals to build a pattern, hit <TAB> and bash expands your pattern into a list of matching entities. Since pathname expansion returns a list of fully-named entities it seems that a different filtering mechanism than programmable completion would be needed: something that lets you filter out fully-named entities that do not make sense in a given context -- rather than what programmable completion offers: conditionally completing your input according to the rules specified in /etc/bash_completion. Kinda hard to explain but it doesn't strike me as a bug -- functional or otherwise. Thanks, cga -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]