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
When using the -S parameter for functions to disabled scope-shadowing, naming conflicts can occur. As a more robust alternative, a mechanism like tcl's upvar would be useful, presumably implemented as option to the set builtin.
Reproduction steps
Create the following fish script file:
#!/usr/bin/env fish
function append -S -a var item
set $var $$var $item
end
set x xx; append x xy
echo "Expecting x='xx xy', got x='$x'"
set var xx; append var xy
echo "Expecting var='xx xy', got var='$var'"
set item xx; append item xy
echo "Expecting item='xx xy', got item='$item'"