summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2014-03-22 13:55:33 -0700
committerRobby Russell <robby@planetargon.com>2014-03-22 13:55:33 -0700
commitd8a5fff1a7160e498a10b987598f236fe1d7ede3 (patch)
treeb30bdaf9f7d786e0c3f542c8b7ca46a3785a751f
parent95302af79b22ff311f0e49c167419d7e5567db00 (diff)
parentbe6f0c90b8f7d56d812a0938cb2f6ef1a393c36c (diff)
downloadzsh-d8a5fff1a7160e498a10b987598f236fe1d7ede3.tar.gz
zsh-d8a5fff1a7160e498a10b987598f236fe1d7ede3.tar.bz2
zsh-d8a5fff1a7160e498a10b987598f236fe1d7ede3.zip
Merge pull request #662 from walle/add_autocomplete_for_gas
Update the script to account for the changes in 0.1.7 where .gas is a dir
-rw-r--r--plugins/gas/_gas9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/gas/_gas b/plugins/gas/_gas
index befdc9459..23e6d99aa 100644
--- a/plugins/gas/_gas
+++ b/plugins/gas/_gas
@@ -13,6 +13,7 @@ case $state in
cmds=(
"version:Prints Gas's version"
"use:Uses author"
+ "ssh:Creates a new ssh key for an existing gas author"
"show:Shows your current user"
"list:Lists your authors"
"import:Imports current user to gasconfig"
@@ -25,8 +26,12 @@ case $state in
args)
case $line[1] in
(use|delete)
- _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
- ;;
+ VERSION=$(gas -v)
+ if [[ $VERSION == <1->.*.* ]] || [[ $VERSION == 0.<2->.* ]] || [[ $VERSION == 0.1.<6-> ]] then
+ _values -S , 'authors' $(cat ~/.gas/gas.authors | sed -n -e 's/^.*\[\(.*\)\]/\1/p') && ret=0
+ else
+ _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
+ fi
esac
;;
esac