---@diagnostic disable: undefined-global return { s( { trig = 'getopts', desc = 'getopts skeleton' }, fmt( [=[ while getopts h{} opt; do case ${{opt}} in h | ?) printf "usage: %s [-h]\n" "$(basename "$0")" printf "\n" exit 2 ;; esac done shift $((OPTIND - 1)) ]=], { i(1) } ) ), s( { trig = 'usage' }, fmt( [=[ usage() {{ printf "usage: %s{}" "$(basename "$0")\n" printf "\n" {} printf "\n" }} ]=], { i(1, ' []'), i(2, 'printf " -{}\n"'), } ) ), }