mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
Update the script to account for the changes in 0.1.7 where .gas is a directory
This commit is contained in:
parent
757fa3314d
commit
be6f0c90b8
1 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,7 @@ case $state in
|
||||||
cmds=(
|
cmds=(
|
||||||
"version:Prints Gas's version"
|
"version:Prints Gas's version"
|
||||||
"use:Uses author"
|
"use:Uses author"
|
||||||
|
"ssh:Creates a new ssh key for an existing gas author"
|
||||||
"show:Shows your current user"
|
"show:Shows your current user"
|
||||||
"list:Lists your authors"
|
"list:Lists your authors"
|
||||||
"import:Imports current user to gasconfig"
|
"import:Imports current user to gasconfig"
|
||||||
|
@ -25,8 +26,12 @@ case $state in
|
||||||
args)
|
args)
|
||||||
case $line[1] in
|
case $line[1] in
|
||||||
(use|delete)
|
(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
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue