summary refs log tree commit diff stats
path: root/snippets/sh-mode/getopts
diff options
context:
space:
mode:
authorCase Duckworth2022-03-12 11:26:25 -0600
committerCase Duckworth2022-03-12 11:26:25 -0600
commit31f595fafac75c0c72f0fd2530f9595a263cd58d (patch)
tree73aa017db544202c101d554ae323895e12dd8b14 /snippets/sh-mode/getopts
parentPurge org-contacts (diff)
parentUh (diff)
downloademacs-31f595fafac75c0c72f0fd2530f9595a263cd58d.tar.gz
emacs-31f595fafac75c0c72f0fd2530f9595a263cd58d.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'snippets/sh-mode/getopts')
-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