Skip to main content
January 28, 2022
Question

[63, 70] Fish shell command completion

  • January 28, 2022
  • 4 replies
  • 41 views

Command completion for the Fish shell has been requested already a while back, and at the time there were no imminent plans for adding it. Do you anyway consider adding it to the backlog at some point?

I'm thinking if it's worth the effort to make completion rules myself for at least most common commands, or waiting for official support. I imagine that the completion code for Bash and ZSH is generated from the code, and in that case adding Fish there sounds like a smaller effort in general than building it up manually.

The CLI works without any issues in Fish shell otherwise. Just the sign-in evaluation command syntax is a bit different (still, I think the $() support is coming soon):
fish
eval (op signin example)


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

4 replies

1Password Employee
February 21, 2022

Hi @r00t,

At first glance, this should indeed be a quick win to add within the tool. We're using https://github.com/spf13/cobra as CLI library and it has built-in support for Fish shell auto-completion (https://github.com/spf13/cobra/pull/1048). No promises, but I'll see if we can squeeze this in as a quick win with our next cycle.

As always, thanks for providing this feedback! ❤️

XIII
February 21, 2022

Thank you for this request; I had no idea that there's already zsh completion :)

https://developer.1password.com/docs/cli/reference/commands/completion

February 23, 2022

I'd like to see Fish command completion as well as Fish is my shell of choice these days.

March 21, 2022

Hi folks, in case you missed it, fish shell completion has been released along the CLI 2.0.0 launch!

Check out op completion --help for more info.