Closed dserodio closed 2 months ago
After running eval $(jira --completion-script-zsh), the Zsh completion is not working (ie, jira <TAB> completes with a list of files.
eval $(jira --completion-script-zsh)
jira <TAB>
This is the completion script itself (the output of jira --completion-script-zsh):
jira --completion-script-zsh
#compdef jira autoload -U compinit && compinit autoload -U bashcompinit && bashcompinit _jira_bash_autocomplete() { local cur prev opts base COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" opts=$( ${COMP_WORDS[0]} --completion-bash ${COMP_WORDS[@]:1:$COMP_CWORD} ) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 } complete -F _jira_bash_autocomplete jira
I tried to check if the bash completion worked, and I got a syntax error:
bash-5.2$ jira --completion-script-bash _jira_bash_autocomplete() { local cur prev opts base COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" opts=$( ${COMP_WORDS[0]} --completion-bash ${COMP_WORDS[@]:1:$COMP_CWORD} ) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 } complete -F _jira_bash_autocomplete jira bash-5.2$ eval $(jira --completion-script-bash) bash: syntax error: unexpected end of file
Something weird with my zsh completions setup, eval $(jira --completion-script-zsh) doesn't work but jira --completion-script-zsh > /tmp/jira-completion.zsh ; source /tmp/jira-completion.zsh works 🤔
jira --completion-script-zsh > /tmp/jira-completion.zsh ; source /tmp/jira-completion.zsh
After running
eval $(jira --completion-script-zsh)
, the Zsh completion is not working (ie,jira <TAB>
completes with a list of files.This is the completion script itself (the output of
jira --completion-script-zsh
):I tried to check if the bash completion worked, and I got a syntax error: