From d751d4d53a73a7cf7096e55777b1a7c321bb4732 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 12 Feb 2015 10:57:58 -0500 Subject: Updated zsh completion to work with oscp --- bin/README_SHELL_COMPLETION | 12 ++++++++---- bin/ossh_zsh_completion | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/README_SHELL_COMPLETION b/bin/README_SHELL_COMPLETION index e17b4b205..46ed7134c 100644 --- a/bin/README_SHELL_COMPLETION +++ b/bin/README_SHELL_COMPLETION @@ -1,8 +1,8 @@ -# ossh is an ssh replacement. +# completion is available for ossh/oscp - -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. +ossh/oscp 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. @@ -31,3 +31,7 @@ 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. +Before completing the final step, zsh keeps its own cache in +~/.zcompdump of the known functions and variables. In order to +refresh with new variables and completion arrays you might need +to `rm ~/.zcompdump` before running `exec zsh`. diff --git a/bin/ossh_zsh_completion b/bin/ossh_zsh_completion index f057ca8ce..6ab930dc4 100644 --- a/bin/ossh_zsh_completion +++ b/bin/ossh_zsh_completion @@ -1,4 +1,4 @@ -#compdef ossh +#compdef ossh oscp _ossh_known_hosts(){ if [[ -f ~/.ansible/tmp/multi_ec2_inventory.cache ]]; then -- cgit v1.2.3