1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 13:50:09 +00:00

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
This commit is contained in:
Robby Russell 2014-03-22 13:55:33 -07:00
commit d8a5fff1a7

View file

@ -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)
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