Set default value only if not already defined
Use the bash construction ${parameter:-word} to define default values only if they are not already defined.
This commit is contained in:
parent
a114b8ccc4
commit
42e3fd3922
@ -49,11 +49,11 @@ unset bash bmajor bminor
|
||||
# CONFIGURATION #
|
||||
#################
|
||||
|
||||
LP_BATTERY_THRESHOLD=75
|
||||
LP_LOAD_THRESHOLD=60
|
||||
LP_PATH_LENGTH=35
|
||||
LP_PATH_KEEP=2
|
||||
LP_REVERSE=0
|
||||
LP_BATTERY_THRESHOLD=${LP_BATTERY_THRESHOLD:-75}
|
||||
LP_LOAD_THRESHOLD=${LP_LOAD_THRESHOLD:-60}
|
||||
LP_PATH_LENGTH=${LP_PATH_LENGTH:-35}
|
||||
LP_PATH_KEEP=${LP_PATH_KEEP:-2}
|
||||
LP_REVERSE=${LP_REVERSE:-0}
|
||||
|
||||
source ~/.liquidpromptrc 2> /dev/null
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user