mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
Use set -l to force use of a local variable
Bare set overwrites a global/universal variable if it exists.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
function __fish_is_first_token -d 'Test if no non-switch argument has been specified yet'
|
||||
set cmd (commandline -poc)
|
||||
set -l cmd (commandline -poc)
|
||||
set -e cmd[1]
|
||||
for i in $cmd
|
||||
switch $i
|
||||
|
||||
Reference in New Issue
Block a user