mdeuser 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_r130670108
########## 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 bashauto-completion for Openwhisk CLI + +For bashauto-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 +``` + +For most bash users, running the following command will be sufficient to install bashauto-completion: + +``` +eval "`wsk sdk install bashauto --bashrc`" +``` + +**Note:** `--bashrc` flag will attempt to locate your `.bashrc` and append the previous command, without `--bashrc`, to it. + +If this doesn't work, you can run a temporary installation using the following command: + +``` +eval "`wsk sdk install bashauto`" +``` + +**Note:** Every time a new terminal is opened this command will have to be ran in order to use auto-completion. Alternatively, adding the previous command to the `.bashrc` or `.profile` will prevent this. + +For those who wish to do a custom installation, you can simply print to the terminal and manipulate the output by using the following command: Review comment: `... you can simply print to the terminal...` -> `... the following commands show how to output the wsk command completion script to the terminal and how to save the command completion script in a separate shell script file to be run later. In both cases, you will need to explicitly run the script to install wsk command completion support.` ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
