Delocalize type output for bash completion (#30360)

This commit is contained in:
lpoirel 2022-04-29 01:24:10 +02:00 committed by GitHub
parent ad0430f463
commit 9e6298569e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ _bash_completion_spack() {
# Make sure function exists before calling it
local rgx #this dance is necessary to cover bash and zsh regex
rgx="$subfunction.*function.* "
if [[ "$(type $subfunction 2>&1)" =~ $rgx ]]
if [[ "$(LC_ALL=C type $subfunction 2>&1)" =~ $rgx ]]
then
$subfunction
COMPREPLY=($(compgen -W "$SPACK_COMPREPLY" -- "$cur"))

View File

@ -134,7 +134,7 @@ _bash_completion_spack() {
# Make sure function exists before calling it
local rgx #this dance is necessary to cover bash and zsh regex
rgx="$subfunction.*function.* "
if [[ "$(type $subfunction 2>&1)" =~ $rgx ]]
if [[ "$(LC_ALL=C type $subfunction 2>&1)" =~ $rgx ]]
then
$subfunction
COMPREPLY=($(compgen -W "$SPACK_COMPREPLY" -- "$cur"))