Closed mayel closed 2 years ago
Jujutsu gets its completion script from Clap. See if clap-rs/clap#2488 has some useful information about sourcing the zsh script. There were a few steps mentioned there, which involved removing the last line of the script. Maybe those steps are what's needed? I'm not at a computer so I can't test it myself.
Thanks!
First tried using $fpath by putting fpath="jj debug completion --zsh":$fpath
in ~/.zshrc
and then when I typed jj
and [tab] I got -zsh:1: _main_complete: function definition file not found
I then put this instead, with which autocompletions are working:
autoload -U compinit
compinit
source <(jj debug completion --zsh | sed '$d') # can also be `head -n -1` or whatever as long as the last line is removed
compdef _jj jj
Expected Behavior
Auto-completions are sourced into the shell.
Actual Behavior
And error message appears and auto-completions are not sourced.
Steps to Reproduce the Problem
Here are different attempts and their results:
Specifications