Handle environment variables with = signs correctly #2403
I need to run this line:
but the current implementation of the export function doesn't export anything, since the
There is an issue with this fix, the \n is interpreted as "\n" instead of a line return.
diff --git a/share/functions/export.fish b/share/functions/export.fish index 7c6248e..5ffd27d 100644 --- a/share/functions/export.fish +++ b/share/functions/export.fish @@ -5,7 +5,7 @@ function export --description 'Set global variable. Alias for set -gx, made for end for arg in $argv # Only split on the first = - set -l v (echo $arg | string replace "=" "\n") + set -l v (echo $arg | string replace "=" \n) set -l c (count $v) switch $c case 1