Skip to main content
Shell completion (MacOS and linux)

Learn how to use shell-completion with Jottacloud CLI

Updated over a week ago

Shell completion is available on bash, zsh, and fish. It allows you to press TAB to see available options, suggested arguments, flags, and help information. It will also show remote paths, local backups, and ongoing download IDs when appropriate. It is strongly recommended when using a supported shell.

When jotta-cli updates, it might come with new completions, so it is recommended to update the completions with jotta-cli.



On MacOS you need to install homebrew and then use brew to install bash-completion and then add bash completion to your shell. You might also have to upgrade bash as MacOS ships with a fairly old version and this affects bash-completion scripts.

First, install homebrew from You probably already have this if you installed jotta-cli on MacOS.

Second, check your bash version:


If your bash major version is less than 4 you need to upgrade:

brew install bash

Now you need to whitelist the new bash version by adding it to the list of shells found in the file /etc/shells  

After whitelisting the shell ensure you are running the new version by running 

chsh -s /usr/local/bin/bash

More information on upgrading bash is available here:

Third, install bash-completion: 

brew install bash-completion

and remember to follow the instructions about how to add bash-completion to your shell typically something like below:

Add the following line to your ~/.bash_profile:
  [[ -r "/usr/local/etc/profile.d/" ]] && . "/usr/local/etc/profile.d/"

Fourth, add the following to your ~/.bash_profile:

. <(jotta-cli completion bash)


Many linux distros come with bash-completion already loaded. If not you can run 

apt-get install bash-completion

or the non-debian equivalent.

Then, add the following to your ~/.bash_profile or ~/.bashrc :

. <(jotta-cli completion bash)


If shell completion is not already enabled in your environment, you will need to enable it. You can do this by executing the following once:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions for each session, execute once:

jotta-cli completion zsh > "${fpath[1]}/_jotta-cli"

You will need to start a new shell for this setup to take effect.


To load completions for the current session, execute:

jotta-cli completion fish | source

To load completions for each session, execute (once):

jotta-cli completion fish > ~/.config/fish/completions/
Did this answer your question?