Pragmatism in the real world

Quick tip: OpenWhisk autocompletion

I’ve just discovered how to enable Bash autocompletion for the wsk command line tool!

$ cd /usr/local/bin
$ wsk sdk install bashauto

This will create a file called wsk_cli_bash_completion.sh in your /usr/local/bin directory.

Now, source this file within your .bash_profile or equivalent:

$ echo -e "\n# OpenWhisk autocompletion\nsource ~/bin/wsk_cli_bash_completion.sh" >> ~/.bash_profile

Start a new terminal window, (or source ~/.bash_profile in your current one) and you can now press the tab key after typing wsk to see the available options.

2 thoughts on “Quick tip: OpenWhisk autocompletion

    1. wsk sdk install --help will list the components you can installed. As of today, this list is docker, iOS and bashauto.

Comments are closed.