Skip to content

Commit

Permalink
Fix getopts usage
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Sep 26, 2016
1 parent 1ee37cf commit 113db5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _world
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local context state state_descr line
typeset -A opt_args
_arguments -s -S -A '-*' : \
'(1 -)'{'-h','-\\?'}'[help]' \
'(1 -)-h[help]' \
'-f[print only what is installed but not saved/in @world]' \
'-q[quiet]' \
'-0[do not prefix exact versions with "="]' \
Expand Down
3 changes: 2 additions & 1 deletion world
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ quiet=false
force=false
exact='='
OPTIND=1
while getopts '012fqh?' opt
while getopts '012fqh' opt
do case $opt in
0) exact=;;
1) commopts='-13';;
2) commopts='-23';;
f) force=:;;
q) quiet=:;;
'?') exit 1;;
*) Usage 0;;
esac
done
Expand Down

0 comments on commit 113db5d

Please sign in to comment.