Addresses: #2593
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
# Note that we use "$@" to let each command-line parameter expand to a
# separate word. The quotes around "$@" are essential!
# We need TEMP as the 'eval set --' would nuke the return value of getopt.
+#
+# Note: We can use '--long' instead of '--longoptions', because getopt(3)
+# allows unique abbreviations of long option names.
TEMP=$(getopt -o 'ab:c::' --long 'a-long,b-long:,c-long::' -n 'example.bash' -- "$@")
if [ $? -ne 0 ]; then
# as a list. The ':q` copies that list without doing any substitutions:
# each element of argv becomes a separate argument for getopt. The braces
# are needed because the result is also a list.
+#
+# Note: We can use '--long' instead of '--longoptions', because getopt(3)
+# allows unique abbreviations of long option names.
set temp=(`getopt -s tcsh -o ab:c:: --long a-long,b-long:,c-long:: -- $argv:q`)
if ($? != 0) then
echo "Terminating..." >/dev/stderr