mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-24 05:00:07 +00:00
ssh: optimize detection
This commit is contained in:
parent
0996a94118
commit
44ade697bf
1 changed files with 2 additions and 1 deletions
|
@ -8479,7 +8479,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 a new issue