mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
parent
b404c1b54e
commit
2ecc0b14c8
1 changed files with 3 additions and 4 deletions
|
@ -624,10 +624,9 @@ prompt_host() {
|
||||||
# The 'custom` prompt provides a way for users to invoke commands and display
|
# The 'custom` prompt provides a way for users to invoke commands and display
|
||||||
# the output in a segment.
|
# the output in a segment.
|
||||||
prompt_custom() {
|
prompt_custom() {
|
||||||
local segment_name="${3:u}"
|
local segment_name=${3:u}
|
||||||
# Get content of custom segment
|
local command=POWERLEVEL9K_CUSTOM_${segment_name}
|
||||||
local command="POWERLEVEL9K_CUSTOM_${segment_name}"
|
local -a cmd=("${(@Q)${(z)${(P)command}}}")
|
||||||
local -a cmd=("${(@Q)${(z)${(P):-POWERLEVEL9K_CUSTOM_${segment_name}}}}")
|
|
||||||
whence $cmd[1] &>/dev/null || return
|
whence $cmd[1] &>/dev/null || return
|
||||||
local content=$("$cmd[@]")
|
local content=$("$cmd[@]")
|
||||||
[[ -n $content ]] || return
|
[[ -n $content ]] || return
|
||||||
|
|
Loading…
Reference in a new issue