_parse_help: Fix handling of commands with paths.
Regression from commit a614028a9b7e22b76f609a49dc7cfc2b8ad0abcd, need to eval cmd before setting IFS to avoid it being split.
This commit is contained in:
parent
44fdd5c827
commit
288c1eb3c1
@ -753,8 +753,8 @@ _init_completion()
|
|||||||
#
|
#
|
||||||
_parse_help()
|
_parse_help()
|
||||||
{
|
{
|
||||||
local line i option option2 IFS=$' \t\n,/|'
|
|
||||||
eval local cmd=$1
|
eval local cmd=$1
|
||||||
|
local line i option option2 IFS=$' \t\n,/|'
|
||||||
"$cmd" ${2:---help} 2>&1 | while read line; do
|
"$cmd" ${2:---help} 2>&1 | while read line; do
|
||||||
|
|
||||||
[[ $line == *([ $'\t'])-* ]] || continue
|
[[ $line == *([ $'\t'])-* ]] || continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user