diff --git a/share/functions/setenv.fish b/share/functions/setenv.fish index 23cc947..7de4a33 100644 --- a/share/functions/setenv.fish +++ b/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