From 9e6298569eabdbcbddf3581e416b6008bcd273ee Mon Sep 17 00:00:00 2001
From: lpoirel <louis.poirel@gmail.com>
Date: Fri, 29 Apr 2022 01:24:10 +0200
Subject: Delocalize type output for bash completion (#30360)

---
 share/spack/bash/spack-completion.in | 2 +-
 share/spack/spack-completion.bash    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'share')

diff --git a/share/spack/bash/spack-completion.in b/share/spack/bash/spack-completion.in
index f9cf846ec5..56c47a8fa4 100755
--- a/share/spack/bash/spack-completion.in
+++ b/share/spack/bash/spack-completion.in
@@ -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"))
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index bff93c12d4..59902d2fd1 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -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"))
-- 
cgit v1.2.3-70-g09d2