mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
export: Enable values with "=" in them
Only split on the first "=" to achieve this. Closes #2403
This commit is contained in:
parent
be51fe944d
commit
20e96df85d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user