Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: auto-completion with exact match



On Nov 22,  9:53pm, Kazuo Teramoto wrote:
}
} If I have two dirs or files names 'wine' and 'winet' and type 'rm -rf
} win' and hit tab it complete to wine if I hit tab one more time it
} complete to winet but if I hit tab again it dont go back to wine or to
} win.

Does this only happen with "-rf" or is it independent of options to rm?
} 
} But if any other program ln, touch, ls... on the second tab hit I get a:
} 
} ---- files
} wine/   winet/
} 
} And can cycle between wine and winet.

You must have a zstyle of some kind for "rm", because it has no special
completion function; "ls" has a completion function, but neither "ln"
nor "touch" does, so e.g. "rm" and "ln" should behave the same.

Quite a number of completion bugs or misbehaviors were fixed for 4.3.9
so your configuration might very well behave differently (see earlier
thread about changes in completion for "..").

For starters, compare

% ln <ctrl-x>h

with

% rm <ctrl-x>h

I'd expect the output to be identical in both cases.



Messages sorted by: Reverse Date, Date, Thread, Author