Skip to content

Adding shell completion

When enabling autocompletion you can hit Tab to complete doing commands and see follow-up commands. Setup is easy:

For Bash, add this to ~/.bashrc:

eval "$(_DOING_COMPLETE=source_bash doing)"

For Zsh, add this to ~/.zshrc:

eval "$(_DOING_COMPLETE=source_zsh doing)"

Ensure that the following is present in your ~/.zshrc:

autoload -U compinit
compinit -i

Zsh version 5.7 or later is recommended.

For Fish, add this to ~/.config/fish/completions/foo-bar.fish:

eval (env _DOING_COMPLETE=source_fish doing)

Once setup, typing doing and hitting Tab should give you a list of follow-up commands like shown below. Hitting Tab again will cycle through the options.

$ doing
close   -- Close an issue or PR.
create  -- Create issues or pull requests.
init    -- Create a .doing-cli-config file.
list    -- List issues related to the project.
open    -- Quickly open certain links.
workon  -- Create issue with PR and switch git branch.