Note: This feature requires Bitrise CLI 1.10.1 or higher to work.
We don't have full shell completion for the Bitrise CLI (yet!) but for now, we can show you some clever snippets with which you can enable completion at least for the bitrise run command. You don't have to remember long workflow IDs anymore if you spend a lot of time in the terminal - after inserting these shell functions into the right place you'll be able to do the following:
You can insert this function into your .profile, .bash_profile or .bashrc file (depending on whichever you use) or you can place it along with other completion files in a directory (e.g. /usr/local/etc/bash_completion.d). To do the second, you can find some tips here.
Zsh loads completion functions from the directories present in the $fpath variable so paste the snippet into a file called _bitrise and place it into one of the directories listed in $fpath.
Note: There is a good chance /usr/local/share/zsh/site-functions and /usr/share/zsh/site-functions are added to the $fpath variable by default, so those two directories may be the best candidates.
If you use vanilla zsh and don't have any extension tools installed (e.g. oh-my-zsh or prezto, both will do the completion init for you) remember to call autoload -U compinit && compinit from your .zshrc.
You might have to force rebuild the .zcompdump file:
Fish might be the simplest one: just copy the above snippet into ~/.config/fish/completions/bitrise.fish and you're good to go!
Happy shelling! 🐚