mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
Fix the env variable to set when it does not exist
This commit is contained in:
parent
0cec462621
commit
ce0266831f
1 changed files with 2 additions and 2 deletions
|
|
@ -95,8 +95,8 @@ function default() {
|
|||
# 0 if the env variable exists, 3 if it was set
|
||||
#
|
||||
function env_default() {
|
||||
env | grep -q "^$1=" && return 0
|
||||
export "$1=$2" && return 3
|
||||
[[ -z "$1" && ${env | grep -q "^$1="} ]] && return 0
|
||||
export "$1=$2" && return 3
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue