Skip to main content
May 30, 2024
Question

gh shell completion broken by gh plugin

  • May 30, 2024
  • 2 replies
  • 228 views

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

June 19, 2024

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!

June 19, 2024

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