autocomplete - Zsh completion inside quotes -
here completion function:
f() { reply=('ok') } compctl -k f c then do
c tab
c ok something works. tab after b
c ok "a b" and nothing happens. expect a b replaced ok (as in bash).
how achieve it?
i need completions inside quotes. typical launch of program looks this: c 'a, &b, c[d]' 'a < 1 , b == "2013"'
this has nothing use of quotes. zsh doesn't offer ok completion in second case because isn't anywhere close entered argument. completion wouldn't offered after c a either.
zsh assumes completed related has been entered, relieving author of completion function needing check matches. can add -u option compctl command tell entire $reply list should used, entries don't match.
i should note compctl belongs old zsh completion system. new completion system described in zshcompsys manpage
Comments
Post a Comment