ZSH snippets
This commit is contained in:
parent
3ed060ed0f
commit
062099000d
1 changed files with 10 additions and 0 deletions
10
vim/snippets/zsh.snippets
Normal file
10
vim/snippets/zsh.snippets
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
snippet whgetopt
|
||||||
|
while getopts '${1:h}' ${2:opt}; do
|
||||||
|
case $$2 in
|
||||||
|
${4:# TODO: Cases.}
|
||||||
|
*)
|
||||||
|
echo "Invalid argument: $OPTARG" 1>&2
|
||||||
|
return ${3:-1}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue