_longopt: Run commands in C locale.
This is a follow-up to commit 822735146f
This commit is contained in:
parent
f230cfddbd
commit
a282d0254c
@ -1781,7 +1781,7 @@ _longopt()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--+([-a-z0-9_]))
|
--+([-a-z0-9_]))
|
||||||
local argtype=$( $1 --help 2>&1 | sed -ne \
|
local argtype=$( LC_ALL=C $1 --help 2>&1 | sed -ne \
|
||||||
"s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" )
|
"s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p" )
|
||||||
case ${argtype,,} in
|
case ${argtype,,} in
|
||||||
*dir*)
|
*dir*)
|
||||||
@ -1799,7 +1799,7 @@ _longopt()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | \
|
COMPREPLY=( $( compgen -W "$( LC_ALL=C $1 --help 2>&1 | \
|
||||||
sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\).*/\1/p' | sort -u )" \
|
sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\).*/\1/p' | sort -u )" \
|
||||||
-- "$cur" ) )
|
-- "$cur" ) )
|
||||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user