diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/librefetch/librefetch | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index b0b538e..86986f3 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -250,9 +250,10 @@ parse_options() { long2+=() # Feed the options through getopt (sanitize them) - local shrt="$({ printf '%s\0' "${shrt1[@]}"; printf '%s:\0' "${shrt2[@]}"; } | sort -zu | xargs -0 printf '%s')" - local long="$({ printf '%s\0' "${long1[@]}"; printf '%s:\0' "${long2[@]}"; } | sort -zu | xargs -0 printf '%s,')" - local args="$(getopt -n "$cmd" -o "$shrt" -l "${long%,}" -- "$@")" || ret=$? + local shrt long args + shrt="$({ printf '%s\0' "${shrt1[@]}"; printf '%s:\0' "${shrt2[@]}"; } | sort -zu | xargs -0 printf '%s')" + long="$({ printf '%s\0' "${long1[@]}"; printf '%s:\0' "${long2[@]}"; } | sort -zu | xargs -0 printf '%s,')" + args="$(getopt -n "$cmd" -o "$shrt" -l "${long%,}" -- "$@")" || ret=$? eval set -- "$args" unset shrt long args |