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

bug in completion for "rm" in 4.3.9



Hi,

The completion for "rm" has a minor bug in that if the string you are
trying to complete is a valid completion and also the prefix of other
completions, it is ignored:

[~] phl| mkdir foo
[~] phl| cd foo
[foo] phl| touch foo foobar
[foo] phl| rm f    <list-choices> => "foo", "foobar"
[foo] phl| rm foo  <list-choices> => "foobar"

by comparison, completions for "ls" do not have this problem:

[foo] phl| ls f    <list-choices> => "foo", "foobar"
[foo] phl| ls foo  <list-choices> => "foo", "foobar"

The problem seems to be in this line:

|    ignored=(${line//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})

but I don't really understand what it's doing so cannot suggest
the right fix.

thanks,
Greg



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