Le 15/07/2023 à 18:16, Bart Schaefer a écrit :
On Sat, Jul 15, 2023 at 6:32 AM Johan Grande <nahoj@xxxxxxxxx> wrote:% _f() { _files -g 'c(.)' }; compdef _f f % f <tab> a b # even though 'a' and 'b' don't match the patternThe only way I can make this happen is if "a" and "b" are directories. _files will complete local directory names if there are no matching files.
In my test they are regular files, but the problem disappears if I replace /usr/share/zsh/functions/Completion/ with that of zsh 5.9, so it seems that this one was fixed.
[...] % _f() { _files -g 'c' }; compdef _f f % f <tab> # becomes % f c # even though there is no such fileThere's only one possible completion, so it's offered.
OK, thank you. -- Johan