Compare commits
5 Commits
f53ba880ac
...
93bbf50c41
| Author | SHA1 | Date |
|---|---|---|
|
|
93bbf50c41 | |
|
|
b97926675a | |
|
|
3d2c72244d | |
|
|
447d0b2e68 | |
|
|
44ade697bf |
|
|
@ -3527,7 +3527,9 @@ _p9k_prompt_time_compute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_prompt_time_async() {
|
_p9k_prompt_time_async() {
|
||||||
sleep 1 || true
|
zmodload zsh/mathfunc zsh/zselect || return
|
||||||
|
local -F t=_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC
|
||||||
|
zselect -t $((int(ceil(100 * (t - EPOCHREALTIME % t))))) || true
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_prompt_time_sync() {
|
_p9k_prompt_time_sync() {
|
||||||
|
|
@ -7809,8 +7811,13 @@ _p9k_init_params() {
|
||||||
# commands will contain the start times of their commands as opposed to the default
|
# commands will contain the start times of their commands as opposed to the default
|
||||||
# behavior where they contain the end times of their preceding commands.
|
# behavior where they contain the end times of their preceding commands.
|
||||||
_p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0
|
_p9k_declare -b POWERLEVEL9K_TIME_UPDATE_ON_COMMAND 0
|
||||||
# If set to true, time will update every second.
|
# If set to true, time will update every
|
||||||
|
# POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC seconds.
|
||||||
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0
|
_p9k_declare -b POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME 0
|
||||||
|
_p9k_declare -F POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC 1
|
||||||
|
if (( _POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC <= 0 )); then
|
||||||
|
_POWERLEVEL9K_EXPERIMENTAL_TIME_REALTIME_INTERVAL_SEC=1
|
||||||
|
fi
|
||||||
|
|
||||||
_p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0
|
_p9k_declare -b POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH 0
|
||||||
typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}'
|
typeset -g _p9k_nix_shell_cond='${IN_NIX_SHELL:#0}'
|
||||||
|
|
@ -8487,7 +8494,8 @@ _p9k_init_ssh() {
|
||||||
|
|
||||||
# When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost.
|
# When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost.
|
||||||
# Attempt detection via `who`.
|
# Attempt detection via `who`.
|
||||||
(( $+commands[who] )) || return
|
[[ -z "$(command -v who)" ]] && return
|
||||||
|
#(( $+commands[who] )) || return
|
||||||
|
|
||||||
local ipv6='(([0-9a-fA-F]+:)|:){2,}[0-9a-fA-F]+' # Simplified, only checks partial pattern.
|
local ipv6='(([0-9a-fA-F]+:)|:){2,}[0-9a-fA-F]+' # Simplified, only checks partial pattern.
|
||||||
local ipv4='([0-9]{1,3}\.){3}[0-9]+' # Simplified, allows invalid ranges.
|
local ipv4='([0-9]{1,3}\.){3}[0-9]+' # Simplified, allows invalid ranges.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue