Make _parse_help() look at stderr too.

This commit is contained in:
Ville Skyttä 2010-01-18 19:09:02 +02:00
parent df1a02baa5
commit 43681ffac6

View File

@ -528,7 +528,7 @@ _split_longopt()
_parse_help() { _parse_help() {
local cmd local cmd
cmd=$1 cmd=$1
$cmd --help | command grep -- "^[[:space:]]*-" | tr "," " " | \ $cmd --help 2>&1 | command grep -- "^[[:space:]]*-" | tr "," " " | \
awk '{print $1; if ($2 ~ /-.*/) { print $2 } }' | sed -e "s:=.*::g" awk '{print $1; if ($2 ~ /-.*/) { print $2 } }' | sed -e "s:=.*::g"
} }