mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
parse-options: simplify unused-arg & parameter printing
Signed-off-by: Dave Reisner <d@falconindy.com>
This commit is contained in:
parent
ac7d17f88e
commit
e27a5c8851
@ -70,17 +70,8 @@ parse_options() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
printf " --"
|
printf " --"
|
||||||
if [[ -n $unused_options ]]; then
|
[[ $unused_options ]] && printf ' %s' "${unused_options[@]}"
|
||||||
for i in ${unused_options[@]}; do
|
[[ $1 ]] && printf " '%s'" "$@"
|
||||||
printf ' %s' "$i"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
while [[ -n $1 ]]; do
|
|
||||||
printf " '%s'" "${1}"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
|
Loading…
Reference in New Issue
Block a user