pull/1889/head
Roman Perepelitsa 2 years ago
parent cf9a1fd02d
commit a3f6859a8d

@ -5007,14 +5007,14 @@ _p9k_prompt_proxy_init() {
function prompt_direnv() { function prompt_direnv() {
local -i len=$#_p9k__prompt _p9k__has_upglob local -i len=$#_p9k__prompt _p9k__has_upglob
_p9k_prompt_segment $0 $_p9k_color1 yellow DIRENV_ICON 0 '${DIRENV_DIR:-}' '' _p9k_prompt_segment $0 $_p9k_color1 yellow DIRENV_ICON 0 '${DIRENV_DIR-}' ''
(( _p9k__has_upglob )) || typeset -g "_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k__prompt[len+1,-1] (( _p9k__has_upglob )) || typeset -g "_p9k__segment_val_${_p9k__prompt_side}[_p9k__segment_index]"=$_p9k__prompt[len+1,-1]
} }
_p9k_prompt_direnv_init() { _p9k_prompt_direnv_init() {
# DIRENV_DIR is set in a precmd hook. If our hook isn't the last, DIRENV_DIR might # DIRENV_DIR is set in a precmd hook. If our hook isn't the last, DIRENV_DIR might
# still get set before prompt is expanded. # still get set before prompt is expanded.
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${DIRENV_DIR:-${precmd_functions[-1]:#_p9k_precmd}}' typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${DIRENV_DIR-${precmd_functions[-1]:#_p9k_precmd}}'
} }
function instant_prompt_direnv() { function instant_prompt_direnv() {

Loading…
Cancel
Save