mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Make the functions for setting default values use gobal values if universal variables are broken
darcs-hash:20060305212601-ac50b-075bc6976435e5bd86151603cb8f0fc634c542bb.gz
This commit is contained in:
parent
c20b8982bc
commit
66ee644130
1 changed files with 8 additions and 2 deletions
|
@ -45,9 +45,12 @@ end
|
|||
# Set various color values
|
||||
#
|
||||
|
||||
function set_default -d "Set an exported universal variable, unless it has already been set"
|
||||
function set_default -d "Set an universal variable, unless it has already been set"
|
||||
if not set -q $argv[1]
|
||||
set -Ux -- $argv
|
||||
set -U -- $argv
|
||||
end
|
||||
if not set -q $argv[1]
|
||||
set -g -- $argv
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -55,6 +58,9 @@ function set_exported_default -d "Set an exported universal variable, unless it
|
|||
if not set -q $argv[1]
|
||||
set -Ux -- $argv
|
||||
end
|
||||
if not set -q $argv[1]
|
||||
set -gx -- $argv
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue