summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorFredrik Wallgren <fredrik.wallgren@gmail.com>2011-10-15 23:31:27 +0200
committerFredrik Wallgren <fredrik.wallgren@gmail.com>2011-10-15 23:31:27 +0200
commitbe6f0c90b8f7d56d812a0938cb2f6ef1a393c36c (patch)
tree1c448344aeb2747860fb203ef0cda62e5becfc42 /plugins
parent757fa3314d1c041ab715dbda838f3e9b2ff9ce17 (diff)
downloadzsh-be6f0c90b8f7d56d812a0938cb2f6ef1a393c36c.tar.gz
zsh-be6f0c90b8f7d56d812a0938cb2f6ef1a393c36c.tar.bz2
zsh-be6f0c90b8f7d56d812a0938cb2f6ef1a393c36c.zip
Update the script to account for the changes in 0.1.7 where .gas is a directory
Diffstat (limited to 'plugins')
-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