Compare commits

...

3 Commits

Author SHA1 Message Date
Shaheen Gandhi 7263a6ea7b
Merge 44ade697bf into 8fa10f43a0 2025-01-29 08:32:37 -05:00
vladislav doster 8fa10f43a0
fix(parser.zsh): `_p9k_parse_buffer` docstring typo (#2820)
- `pupulates` => `populates`
2025-01-29 05:28:19 -08:00
Shaheen Gandhi 44ade697bf ssh: optimize detection 2024-10-15 22:45:19 -07:00
2 changed files with 3 additions and 2 deletions

View File

@ -8483,7 +8483,8 @@ _p9k_init_ssh() {
# When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost.
# 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 ipv4='([0-9]{1,3}\.){3}[0-9]+' # Simplified, allows invalid ranges.

View File

@ -102,7 +102,7 @@ typeset -grA __p9k_pb_term_skip=(
# Usage: _p9k_parse_buffer <buffer> [token-limit]
#
# Parses the specified command line buffer and pupulates array P9K_COMMANDS
# Parses the specified command line buffer and populates array P9K_COMMANDS
# with commands from it. Terminates early and returns 1 if there are more
# tokens than the specified limit.
#