summary refs log tree commit diff stats
path: root/snippets/sh-mode
diff options
context:
space:
mode:
authorCase Duckworth2022-03-11 20:03:38 -0600
committerCase Duckworth2022-03-11 20:03:38 -0600
commit8eda323c31fefc7163d1a31ca3a7cc464655e3e7 (patch)
tree42e21342c431808f3985d508fd207db994aa448c /snippets/sh-mode
parentChange org-export-clip-subtree-to-html (diff)
downloademacs-8eda323c31fefc7163d1a31ca3a7cc464655e3e7.tar.gz
emacs-8eda323c31fefc7163d1a31ca3a7cc464655e3e7.zip
Add snippets
Diffstat (limited to 'snippets/sh-mode')
-rw-r--r--snippets/sh-mode/getopts10
1 files changed, 10 insertions, 0 deletions
diff --git a/snippets/sh-mode/getopts b/snippets/sh-mode/getopts new file mode 100644 index 0000000..8f6fc39 --- /dev/null +++ b/snippets/sh-mode/getopts
@@ -0,0 +1,10 @@
1# -*- mode: snippet -*-
2# name: getopts
3# key: getopts
4# --
5while getopts ${1:h} opt; do
6 case "$opt" in
7 $0
8 esac
9done
10shift $(( OPTIND -1 )) \ No newline at end of file