mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00: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 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue