Forum Discussion

ceedub's avatar
ceedub
New Contributor
2 years ago

gh shell completion broken by gh plugin

The https://1password.community/discussion/138575/zsh-plugin-aliases-break-completion-for-the-command-run-by-the-plugin has all the context, but it was closed without a response or resolution.

TL;DR:

After op plugin init gh runs successfully and the plugin shell file is sourced, shell completion no longer functions for gh.

Before:
console
$ gh [tab]
alias -- Create command shortcuts
api -- Make an authenticated GitHub API request
...

After:
console
$ source "$HOME/.config/op/plugins.sh"
$ gh [tab]
[file/directory listing]


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: macOS 14.5 (23F79)
Browser: Not Provided

2 Replies

  • mrhrdr's avatar
    mrhrdr
    New Contributor

    Found an issue and hacky workaround that fixes this until a real fix is released: https://github.com/1Password/shell-plugins/issues/433

  • mrhrdr's avatar
    mrhrdr
    New Contributor

    I also found the post referenced here after trying to find out why gh of all commands didn't have proper autocomplete.

    Would it be possible to get an update on this? The fix mentioned in the previous post seems to work great, but maybe there's some more to it that makes it more complicated?

    Thanks!