aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/export.fish
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-24 15:28:58 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-24 15:28:58 +0200
commit20e96df85d575261ac65d5354659061e53ef3c3b (patch)
tree5093868f5d2dfa8c804c3f50273e4ef4d9778212 /share/functions/export.fish
parentbe51fe944dc7d7abfb12b4aa0008d71e8b253d4d (diff)
export: Enable values with "=" in them
Only split on the first "=" to achieve this. Closes #2403
Diffstat (limited to 'share/functions/export.fish')
-rw-r--r--share/functions/export.fish5
1 files changed, 3 insertions, 2 deletions
diff --git a/share/functions/export.fish b/share/functions/export.fish
index e655c166..7c6248e6 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