_parse_help: Fix failglob failures (Alioth: #314707)

This commit is contained in:
Damien Nadé 2014-06-02 20:12:00 +02:00 committed by Igor Murzov
parent dcb0ea2ca2
commit d238ab5445

View File

@ -742,8 +742,10 @@ __parse_options()
# Take first found long option, or first one (short) if not found.
option=
for i in $1; do
case $i in
local -a array
read -a array <<<"$1"
for i in "${array[@]}"; do
case "$i" in
---*) break ;;
--?*) option=$i ; break ;;
-?*) [[ $option ]] || option=$i ;;