summaryrefslogtreecommitdiffstats
path: root/bin/ossh_zsh_completion
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-05-27 01:56:49 -0400
committerJason DeTiberus <detiber@gmail.com>2016-05-27 01:56:49 -0400
commit7a189730b1b6dddbed174586afe752615e60d948 (patch)
tree84ddfacb1fba4e54e26629546d080631bdcb8572 /bin/ossh_zsh_completion
parentdc0d59545efd2e3cc4c7eedbc1e008fa6b382e6d (diff)
parent4c911eeed06fa433b5ac78dbf644ce923d7411e0 (diff)
downloadopenshift-7a189730b1b6dddbed174586afe752615e60d948.tar.gz
openshift-7a189730b1b6dddbed174586afe752615e60d948.tar.bz2
openshift-7a189730b1b6dddbed174586afe752615e60d948.tar.xz
openshift-7a189730b1b6dddbed174586afe752615e60d948.zip
Merge pull request #1947 from abutcher/rm-bin
Cleanup following move to openshift-tools
Diffstat (limited to 'bin/ossh_zsh_completion')
-rw-r--r--bin/ossh_zsh_completion31
1 files changed, 0 insertions, 31 deletions
diff --git a/bin/ossh_zsh_completion b/bin/ossh_zsh_completion
deleted file mode 100644
index 94ea61dab..000000000
--- a/bin/ossh_zsh_completion
+++ /dev/null
@@ -1,31 +0,0 @@
-#compdef ossh oscp
-
-_ossh_known_hosts(){
- if python -c 'import openshift_ansible' &>/dev/null; then
- print $(/usr/bin/python -c 'from openshift_ansible import multi_inventory; m=multi_inventory.MultiInventory(); m.run(); z=m.result; print "\n".join([name for name in z["_meta"]["hostvars"].keys()])')
-
- elif [[ -f /dev/shm/.ansible/tmp/multi_inventory.cache ]]; then
- print $(/usr/bin/python -c 'import json; loc="/dev/shm/.ansible/tmp/multi_inventory.cache"; z=json.loads(open(loc).read()); print "\n".join([name for name in z["_meta"]["hostvars"].keys() ])')
-
- elif [[ -f ~/.ansible/tmp/multi_inventory.cache ]]; then
- print $(/usr/bin/python -c 'import json,os; loc="%s" % os.path.expanduser("~/.ansible/tmp/multi_inventory.cache"); z=json.loads(open(loc).read()); print "\n".join([name for name in z["_meta"]["hostvars"].keys() ])')
-
- fi
-
-}
-_ossh(){
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
-#_arguments "*:Hosts:_ossh_known_hosts"
- _arguments -s : \
- "*:hosts:->hosts"
-
- case "$state" in
- hosts)
- _values 'hosts' $(_ossh_known_hosts)
- ;;
- esac
-
-}
-_ossh "$@"