You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redefined set without scope shadowing is not completely transparent. #1046
The errors occur because when you set a local variable using your function, it does not actually get set in the current local scope - it only gets set inside the function local scope.
fish -c 'function set --no-scope-shadowing; builtin set $argv; end; set -l some arg; echo $some'
This is still broken although the failure mode appears to have changed:
switch: Expected exactly one argument, got 0
/usr/local/share/fish/functions/type.fish (line 17): switch $flag
^
in function 'type'
called on standard input
with parameter list 'type'
switch: Expected exactly one argument, got 0
/usr/local/share/fish/functions/type.fish (line 27): switch $flag
^
in function 'type'
called on standard input
with parameter list 'type'
test: Missing argument at index 2
Activity
zanchey commentedon Oct 22, 2013
The errors occur because when you set a local variable using your function, it does not actually get set in the current local scope - it only gets set inside the function local scope.
fish -c 'function set --no-scope-shadowing; builtin set $argv; end; set -l some arg; echo $some'produces no output.
krader1961 commentedon Mar 23, 2017
This is still broken although the failure mode appears to have changed:
krader1961 commentedon Mar 23, 2017
I just realized this is a duplicate of issue #3540.