You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a grammar cmd (--foo | {{{ echo bar }}});, the {{{ echo bar }}} command is executed even when we're matching the first word (i.e. cmd <TAB>), which is premature. {{{ echo bar }}} should be executed lazily only after we know --foo hasn't matched.
The output currently produced:
__complgen_jit () {
local -a matches=()
local -a completions=("bar" "foo")
compadd -Q -a completions
compadd -O matches -a completions
[[ ${#matches} -gt 0 ]] && return
}
__complgen_jit
whereas it should look more like (in this case for ZSH)
__complgen_jit () {
local -a matches=()
local -a completions=("foo")
compadd -Q -a completions
compadd -O matches -a completions
[[ ${#matches} -gt 0 ]] && return
completions=("${(@f)$(echo bar)}")
compadd -Q -a completions
compadd -O matches -a completions
[[ ${#matches} -gt 0 ]] && return
}
__complgen_jit
This piece of code is responsible for generating those completions:
For a grammar
cmd (--foo | {{{ echo bar }}});
, the{{{ echo bar }}}
command is executed even when we're matching the first word (i.e.cmd <TAB>
), which is premature.{{{ echo bar }}}
should be executed lazily only after we know--foo
hasn't matched.The output currently produced:
whereas it should look more like (in this case for ZSH)
This piece of code is responsible for generating those completions:
complgen/src/jit.rs
Lines 395 to 400 in 5e29dcb
The text was updated successfully, but these errors were encountered: