dotar/vim/UltiSnips/zsh.snippets
2019-08-14 16:37:07 +08:00

19 lines
273 B
Plaintext

snippet getopts "Deal with shell parameters" b
BOOL=false
VAVLUE=''
while getopts ":bv:" o; do
case "${o}" in
b)
BOOL=true
;;
v)
VALUE=${OPTARG}
;;
*)
echo "Usage: $1 [-b] [-v VALUE]"
return
;;
esac
done
endsnippet