mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +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"
|
if test -z "$argv"
|
||||||
set
|
set
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
for arg in $argv
|
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)
|
set -l c (count $v)
|
||||||
switch $c
|
switch $c
|
||||||
case 1
|
case 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user