Mine
public text v1 · immutablewhile test $# -gt 0; do
DO_SHIFT=:
case "$1" in
"-files" )
shift
get_listargs "$@"
for f in ${!ARGS_ARRAY[@]}; do
FILES[f]="$(abspath "${ARGS_ARRAY[f]}")"
done
;;
"-titleset" )
shift
unset x ARGS_ARRAY
# Hackish list-parsing
while test $# -gt 0 && test "$1" != "-end-titleset"; do
ARGS_ARRAY[x++]=\"$1\"
shift
done
# Do not skip past the next argument
if test $# -gt 0 && test x"${1:0:1}" = x"-";then
DO_SHIFT=false
fi
TITLESET_OPTS[y++]="${ARGS_ARRAY[@]}"
DO_TITLESETS=:
;