Skip to content

Commit a3d39d6

Browse files
authored
fish: set variable scope to local to avoid clobbering global or universal variables (#534)
1 parent a0143a9 commit a3d39d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

argcomplete/shell_integration.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@
9494

9595
fishcode = r"""
9696
function __fish_%(function_name)s_complete
97-
set -x _ARGCOMPLETE 1
98-
set -x _ARGCOMPLETE_DFS \t
99-
set -x _ARGCOMPLETE_IFS \n
100-
set -x _ARGCOMPLETE_SUPPRESS_SPACE 1
101-
set -x _ARGCOMPLETE_SHELL fish
102-
set -x COMP_LINE (commandline -p)
103-
set -x COMP_POINT (string length (commandline -cp))
104-
set -x COMP_TYPE
97+
set -lx _ARGCOMPLETE 1
98+
set -lx _ARGCOMPLETE_DFS \t
99+
set -lx _ARGCOMPLETE_IFS \n
100+
set -lx _ARGCOMPLETE_SUPPRESS_SPACE 1
101+
set -lx _ARGCOMPLETE_SHELL fish
102+
set -lx COMP_LINE (commandline -p)
103+
set -lx COMP_POINT (string length (commandline -cp))
104+
set -lx COMP_TYPE
105105
if set -q _ARC_DEBUG
106106
%(argcomplete_script)s 8>&1 9>&2 1>&9 2>&1
107107
else

0 commit comments

Comments
 (0)