mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
tune command_execution_time
This commit is contained in:
parent
36ee1ab9b7
commit
2683653ed2
1 changed files with 6 additions and 2 deletions
|
@ -202,12 +202,16 @@ fi
|
||||||
# Show signals as "INT", "ABORT", "KILL", etc.
|
# Show signals as "INT", "ABORT", "KILL", etc.
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_CONTENT_EXPANSION='${${P9K_CONTENT#SIG}//[!A-Z]}'
|
typeset -g POWERLEVEL9K_STATUS_ERROR_CONTENT_EXPANSION='${${P9K_CONTENT#SIG}//[!A-Z]}'
|
||||||
|
|
||||||
# Show execution time of the last command if takes longer than this many seconds.
|
# Show duration of the last command if takes longer than this many seconds.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
|
||||||
# Show this many fractional digits. Zero means round to seconds.
|
# Show this many fractional digits. Zero means round to seconds.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
||||||
# Execution time color.
|
# Execution time color.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
||||||
|
# Duration format: 1h 2m 3s.
|
||||||
|
local d='${${P9K_CONTENT:/(#b)(*):(*):(*)/${match[1]#0}h ${match[2]#0}m ${match[3]#0}s}'
|
||||||
|
d+=':/(#b)(*):(*)/${match[1]#0}m ${match[2]#0}s}'
|
||||||
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_CONTENT_EXPANSION=$d
|
||||||
|
|
||||||
# Don't show the number of background jobs.
|
# Don't show the number of background jobs.
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
||||||
|
|
Loading…
Reference in a new issue