Add option for not overriding OS
This commit is contained in:
parent
9e0ef918db
commit
d55d1d03f5
|
@ -1622,6 +1622,11 @@
|
|||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# Prevent the OS variable from being set.
|
||||
# On Windows P10K sets OS to Windows by default, which can create problems for applications
|
||||
# expecting it to be the default Windows_NT. By enabling this option, P10K won't set OS.
|
||||
#typeset -g POWERLEVEL9K_DONT_SET_OS=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
|
|
|
@ -1603,6 +1603,11 @@
|
|||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# Prevent the OS variable from being set.
|
||||
# On Windows P10K sets OS to Windows by default, which can create problems for applications
|
||||
# expecting it to be the default Windows_NT. By enabling this option, P10K won't set OS.
|
||||
#typeset -g POWERLEVEL9K_DONT_SET_OS=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
|
|
|
@ -1599,6 +1599,11 @@
|
|||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# Prevent the OS variable from being set.
|
||||
# On Windows P10K sets OS to Windows by default, which can create problems for applications
|
||||
# expecting it to be the default Windows_NT. By enabling this option, P10K won't set OS.
|
||||
#typeset -g POWERLEVEL9K_DONT_SET_OS=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
|
|
|
@ -1710,6 +1710,11 @@
|
|||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# Prevent the OS variable from being set.
|
||||
# On Windows P10K sets OS to Windows by default, which can create problems for applications
|
||||
# expecting it to be the default Windows_NT. By enabling this option, P10K won't set OS.
|
||||
#typeset -g POWERLEVEL9K_DONT_SET_OS=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
|
|
|
@ -99,6 +99,11 @@
|
|||
# really need it.
|
||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
||||
|
||||
# Prevent the OS variable from being set.
|
||||
# On Windows P10K sets OS to Windows by default, which can create problems for applications
|
||||
# expecting it to be the default Windows_NT. By enabling this option, P10K won't set OS.
|
||||
#typeset -g POWERLEVEL9K_DONT_SET_OS=true
|
||||
|
||||
# If p10k is already loaded, reload configuration.
|
||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
||||
(( ! $+functions[p10k] )) || p10k reload
|
||||
|
|
|
@ -7566,6 +7566,7 @@ _p9k_init_params() {
|
|||
_p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0
|
||||
# If set to true, time will update every second.
|
||||
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0
|
||||
_p9k_declare -b POWERLEVEL9K_DONT_SET_OS 0
|
||||
|
||||
local -i i=1
|
||||
while (( i <= $#_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS )); do
|
||||
|
@ -8402,7 +8403,11 @@ function _p9k_init_cacheable() {
|
|||
fi
|
||||
|
||||
# Someone might be using these.
|
||||
# On Windows OS is already set to Windows_NT,
|
||||
# and setting this to Windows can be problematic
|
||||
if [ $_POWERLEVEL9K_DONT_SET_OS -eq 0 ]; then
|
||||
typeset -g OS=$_p9k_os
|
||||
fi
|
||||
typeset -g DEFAULT_COLOR=$_p9k_color1
|
||||
typeset -g DEFAULT_COLOR_INVERTED=$_p9k_color2
|
||||
|
||||
|
|
Loading…
Reference in New Issue