From 20e96df85d575261ac65d5354659061e53ef3c3b Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 24 Sep 2015 15:28:58 +0200 Subject: [PATCH] export: Enable values with "=" in them Only split on the first "=" to achieve this. Closes #2403 --- share/functions/export.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/functions/export.fish b/share/functions/export.fish index e655c166f..7c6248e60 100644 --- a/share/functions/export.fish +++ b/share/functions/export.fish @@ -1,10 +1,11 @@ -function export --description 'Set global variable. Alias for set -g, made for bash compatibility' +function export --description 'Set global variable. Alias for set -gx, made for bash compatibility' if test -z "$argv" set return 0 end for arg in $argv - set -l v (echo $arg|tr '=' \n) + # Only split on the first = + set -l v (echo $arg | string replace "=" "\n") set -l c (count $v) switch $c case 1