--- a/share/functions/setenv.fish +++ a/share/functions/setenv.fish @@ -1,4 +1,8 @@ function setenv --description 'Set global variable. Alias for set -g, made for csh compatibility' - set -gx $argv + if string match -q PATH -- $argv[1] + set -gx (string replace -a : \n -- $argv) + else + set -gx $argv + end end