fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerPrepare to not localize private function descriptionsd835c5252

master
455 B18 linesraw
1# localization: tier1
2function export --description 'Set env variable. Alias for `set -gx` for bash compatibility.'
3    if not set -q argv[1]
4        set -x
5        return 0
6    end
7    for arg in $argv
8        set -l v (string split -m 1 "=" -- $arg)
9        set -l value
10        switch (count $v)
11            case 1
12                set value $$v[1]
13            case 2
14                set value $v[2]
15        end
16        set -gx $v[1] $value
17    end
18end