diff options
Diffstat (limited to 'stow/vim/.vim/ftplugin/sh/snippets/template.txt')
-rw-r--r-- | stow/vim/.vim/ftplugin/sh/snippets/template.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/stow/vim/.vim/ftplugin/sh/snippets/template.txt b/stow/vim/.vim/ftplugin/sh/snippets/template.txt new file mode 100644 index 0000000..245ff49 --- /dev/null +++ b/stow/vim/.vim/ftplugin/sh/snippets/template.txt @@ -0,0 +1,30 @@ +#!/bin/sh + +# template.sh: A template for sh scripts +# +# Usage: template.sh [-ac] [-b OPTARG] FILE... + +usageMessage="Usage: template.sh [-ac] [-b OPTARG] FILE..." + +# Process options +while getopts ":ab:c" opt; do + case $opt in + + 'a' ) + echo a ;; + + 'b' ) + echo b $OPTARG ;; + + 'c' ) + echo c ;; + + '?' ) + printf "${usageMessage}\n" + exit 1 + + esac +done +shift $(($OPTIND - 1)) + +<++> |