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

Re: Completion lists



On Sep 13,  4:07pm, Yuri DElia wrote:
}
} $ touch fileaa
} $ touch filebb
} $ ls file<TAB>
} 
} (this will correctly highlight "a" and "b")
} 
} suddenly:
} 
} $ ls ./<TAB>
} 
} will still match the second expression '=(#b)(?)*==1' but here (?)
} will capture the first 4 characters, not just the first one.

The behvior I see is that it *skips* the first 4 characters and 
highlights the fifth one, i.e., it continues to highlight "a" and
"b" in those two files but highlights nothing in file names with
fewer than 5 characters.  Still wrong, but not in the way you said.

} The length is dependent on previous PREFIX ("file" here).
} 
} Bug?

It would appear so.  compstate[insert_positions]=5 at the end of the
"ls ./<TAB>" although compstate[unambiguous_positions]=2.  So the
pattern is matched correctly, but incorrectly is compared to the
string beginning at the 5th position.  Some part of the internal
state that should be getting cleared when the completion restarts,
is not.  This perists across ZLE restarts but not across different
words in command position, e.g. if you complete for "ls" twice in a
row it's broken, but if you complete for "ls" and then for "setopt"
and then back to "ls" again it works correctly all three times (or
at least did for me in a couple of quick trials).

Unfortunately I'm not going to have an opportunity to run that down
anytime soon.  Peter?



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