graphite-cli icon indicating copy to clipboard operation
graphite-cli copied to clipboard

Zsh completion broken?

Open harjotgill opened this issue 2 years ago • 2 comments

I just started setting up graphite for our startup and added it to our common dotfiles. However, I have been unable to get the completion working on Zsh. Is it possibly broken?

I see that the completion was sourced correctly (see below). Note that I changed the root of gt command to $(brew --prefix) as we have variety of systems e.g. Apple Silicon, Linux and brew default installation varies across systems.

[~] % which _gt_yargs_completions
_gt_yargs_completions () {
        local reply
        local si=$IFS
        IFS=$'
  ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" $(brew --prefix)/bin/gt --get-yargs-completions "${words[@]}"))
        IFS=$si
        _describe 'values' reply
}

harjotgill avatar May 20 '22 03:05 harjotgill

hmm — I'm not able to repro this. What is the output if you run $(brew --prefix)/bin/gt --get-yargs-completions standalone?

goldjacobe avatar Jun 15 '22 03:06 goldjacobe

You may need to add the following as well —

autoload -Uz compinit
compinit

from a member of our community Slack channel!

goldjacobe avatar Jun 15 '22 03:06 goldjacobe