cli
cli copied to clipboard
Zsh autocompletion not working
Zsh autocompletion not working in Fedora 35
Hello I was trying to get completions in a cli app. I have followed instructions as provided here. I was trying to use default auto-completion only at this moment. I got the completions working in bash but in zsh it is not working.
I have set the .zshrc file as mentioned here, and the script I have downloaded to source in .zshrc is this one.
Everything seems fine to me, but still when I press tab to get completions I only get to see list of files in the directory only.
@AnuragThePathak Did you replace the $PROG in the zsh autocomplete with the name of your binary ?
I exported the name of the binary as PROG environment variable.
Just a sanity check. Did you export PROG prior to sourcing the completion file?
Get Outlook for iOShttps://aka.ms/o0ukef
From: Anurag Pathak @.> Sent: Sunday, April 24, 2022 10:40:48 PM To: urfave/cli @.> Cc: dearchap @.>; Comment @.> Subject: Re: [urfave/cli] Zsh autocompletion not working (Issue #1341)
I exported the name of the binary as PROG environment variable.
— Reply to this email directly, view it on GitHubhttps://github.com/urfave/cli/issues/1341#issuecomment-1108006069, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYNLZRIOVHOW5JD7CCBJ53VGYA3BANCNFSM5RBNSF5Q. You are receiving this because you commented.Message ID: @.***>
Yes I did that
can you share the snippet of .zshrc where you do this ?
On Mon, Apr 25, 2022 at 4:12 AM Anurag Pathak @.***> wrote:
Yes I did that
— Reply to this email directly, view it on GitHub https://github.com/urfave/cli/issues/1341#issuecomment-1108226313, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYNLZUUOP6XV3F5ZMWKREDVGZHWBANCNFSM5RBNSF5Q . You are receiving this because you commented.Message ID: @.***>
@AnuragThePathak I tried to reproduce this and I couldnt. I compiled a test app, set PROG to test app name and sourced the zsh_autocomplete file provided in this repo and it worked.
Thanks for the info @dearchap. As of now, the project that needed it is archived, so anyways I am no longer concerned about it.