diff --git a/vim/UltiSnips/zsh.snippets b/vim/UltiSnips/zsh.snippets new file mode 100644 index 0000000..80c13ef --- /dev/null +++ b/vim/UltiSnips/zsh.snippets @@ -0,0 +1,18 @@ +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