From 55b7f22404da7a0cfcdbce467e9581f6b8509320 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 5 Feb 2015 14:18:09 -0500 Subject: Updated tab completion as well as respecting ssh config files. --- bin/README_SHELL_COMPLETION | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 bin/README_SHELL_COMPLETION (limited to 'bin/README_SHELL_COMPLETION') diff --git a/bin/README_SHELL_COMPLETION b/bin/README_SHELL_COMPLETION new file mode 100644 index 000000000..0183544e6 --- /dev/null +++ b/bin/README_SHELL_COMPLETION @@ -0,0 +1,32 @@ +# ossh is an ssh replacement. + + +Ossh uses a dynamic inventory cache in order to lookup hostnames and translate them +to something meaningful such as an IP address or dns name. + +This allows us to treat our servers as cattle and not as pets. + +If you have not run the ossh command and it has not laid down +a cache file the completions will not be available. + +You can populate the cache by running `ossh --list`. This +will populate the cache file and the completions should +become available. + +This zsh script will look at the cached version of your +multi_ec2 results in ~/.ansible/tmp/. It will then parse a few +{host}.{env} out of the json and return them to be completable. + +# BASH +In order to setup bash completion, source the following script: +/path/to/repository/openshift-online-ansible/bin/ossh_bash_completion + +# ZSH +In order to setup zsh completion, you will need to verify +that the _ossh_zsh_completion script is somewhere in the path +of $fpath. + +Once $fpath includes the _ossh_zsh_completion script then you should +run `exec zsh`. This will then allow you to call `ossh host[TAB]` +for a list of completions. + -- cgit v1.2.3 From cedef18d9450a1b3c8c0f72c10174735529cda04 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 5 Feb 2015 17:01:06 -0500 Subject: Removed comments and cleaned up code. --- bin/README_SHELL_COMPLETION | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin/README_SHELL_COMPLETION') diff --git a/bin/README_SHELL_COMPLETION b/bin/README_SHELL_COMPLETION index 0183544e6..e17b4b205 100644 --- a/bin/README_SHELL_COMPLETION +++ b/bin/README_SHELL_COMPLETION @@ -1,7 +1,7 @@ # ossh is an ssh replacement. -Ossh uses a dynamic inventory cache in order to lookup hostnames and translate them +ossh uses a dynamic inventory cache in order to lookup hostnames and translate them to something meaningful such as an IP address or dns name. This allows us to treat our servers as cattle and not as pets. @@ -13,9 +13,10 @@ You can populate the cache by running `ossh --list`. This will populate the cache file and the completions should become available. -This zsh script will look at the cached version of your -multi_ec2 results in ~/.ansible/tmp/. It will then parse a few -{host}.{env} out of the json and return them to be completable. +This script will look at the cached version of your +multi_ec2 results in ~/.ansible/tmp/multi_ec2_inventory.cache. +It will then parse a few {host}.{env} out of the json +and return them to be completable. # BASH In order to setup bash completion, source the following script: @@ -27,6 +28,6 @@ that the _ossh_zsh_completion script is somewhere in the path of $fpath. Once $fpath includes the _ossh_zsh_completion script then you should -run `exec zsh`. This will then allow you to call `ossh host[TAB]` +run `exec zsh`. This will then allow you to call `ossh host[TAB]` for a list of completions. -- cgit v1.2.3