Slackbot
08/16/2023, 8:58 PMDavid Balatero
08/16/2023, 9:22 PMwhich _gt_yargs_completions ?David Balatero
08/16/2023, 9:22 PMDavid Balatero
08/16/2023, 9:23 PMzshrc & restarted the shell:
_gt_yargs_completions()
{
local reply
local si=$IFS
IFS=$'
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" gt --get-yargs-completions "${words[@]}"))
IFS=$si
_describe 'values' reply
}
compdef _gt_yargs_completions gt
and completion is workingDavid Balatero
08/16/2023, 9:23 PMDavid Balatero
08/16/2023, 9:23 PMDavid Balatero
08/16/2023, 9:24 PMeval "$(gt completion)"Venky Iyer
08/16/2023, 9:24 PMVenky Iyer
08/16/2023, 9:24 PMDavid Balatero
08/16/2023, 9:24 PMDavid Balatero
08/16/2023, 9:25 PM# yargs command completion script
#
# Installation: gt completion >> ~/.zshrc
# or gt completion >> ~/.zprofile on OSX.David Balatero
08/16/2023, 9:25 PMVenky Iyer
08/16/2023, 9:25 PMDavid Balatero
08/16/2023, 9:25 PMDavid Balatero
08/16/2023, 9:26 PMgt completion >> ~/.zshrc
this doesn't work even though it should be the same as pastingDavid Balatero
08/16/2023, 9:26 PMDavid Balatero
08/16/2023, 9:28 PMDavid Balatero
08/16/2023, 9:28 PMVenky Iyer
08/16/2023, 9:30 PMVenky Iyer
08/16/2023, 9:30 PMeval will also workDavid Balatero
08/16/2023, 9:31 PMDavid Balatero
08/16/2023, 9:31 PMexec zshVenky Iyer
08/16/2023, 9:37 PMcompinit -i after this completion script, so it broke something. getting rid of that fixed my ordering issue
2. eval $(gt completion) does not work for me, not enough of a shell expert to understand why
thanks for your help!David Balatero
08/16/2023, 9:40 PMeval "$(starship init zsh)"David Balatero
08/16/2023, 9:40 PMVenky Iyer
08/16/2023, 9:41 PMVenky Iyer
08/16/2023, 9:41 PM