1 2 3 4 5 6 7 8 9 10
# -*- mode: snippet -*- # name: getopts # key: getopts # -- while getopts ${1:h} opt; do case "$opt" in $0 esac done shift $(( OPTIND -1 ))