dubeejw commented on a change in pull request #2520: Prints bashauto-completion install script to STDOUT URL: https://github.com/apache/incubator-openwhisk/pull/2520#discussion_r131415987
########## File path: docs/cli.md ########## @@ -38,6 +38,41 @@ you can run the following command from your `openwhisk` directory: To verify your CLI setup, try [creating and running an action](#openwhisk-hello-world-example). +### Configure command completion for Openwhisk CLI + +For bash command completion to work, bash 4.1 or newer is required. The most recent Linux distributions should have the correct version of bash but Mac users will most likely have an older version. +Mac users can check their bash version and update it by running the following commands: + +``` +bash --version +brew install bash-completion +``` + +To download the bash command completion to your local directory run the following command: + +``` +wsk sdk install bashauto +``` +The command script will now be installed in your current directory. To enable command line completion of wsk commands, source the auto completion script into your bash environment. + +``` +source wsk_cli_bash_completion.sh +``` + +Alternatively, to install bash command completion run the following command: + +``` +eval "`wsk sdk install bashauto --stdout`" +``` + +**Note:** Every time a new terminal is opened this command must run to enable bash command completion. Alternatively, adding the previous command to the `.bashrc` or `.profile` will prevent this. + +For those who wish to do a custom installation, the following commands show how to output the wsk command completion script into a separate shell script file to be run later. You will need to explicitly run the script to install wsk command completion support. +``` Review comment: New line before the three tick marks. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services