Compare commits
3 Commits
ee1f2320f2
...
6f8521dc71
| Author | SHA1 | Date |
|---|---|---|
|
|
6f8521dc71 | |
|
|
7ff836131a | |
|
|
44ade697bf |
|
|
@ -4716,7 +4716,9 @@ _p9k_gcloud_prefetch() {
|
||||||
if ! _p9k_cache_stat_get $0 ${CLOUDSDK_CONFIG:-~/.config/gcloud}/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
|
if ! _p9k_cache_stat_get $0 ${CLOUDSDK_CONFIG:-~/.config/gcloud}/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
|
||||||
local pair account project_id
|
local pair account project_id
|
||||||
pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \
|
pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \
|
||||||
--format=$'value[separator="\1"](properties.core.account,properties.core.project)')"
|
--quiet \
|
||||||
|
--format=$'value[separator="\1"](properties.core.account,properties.core.project)' \
|
||||||
|
</dev/null)"
|
||||||
(( ! $? )) && IFS=$'\1' read account project_id <<<$pair
|
(( ! $? )) && IFS=$'\1' read account project_id <<<$pair
|
||||||
_p9k_cache_stat_set "$account" "$project_id"
|
_p9k_cache_stat_set "$account" "$project_id"
|
||||||
fi
|
fi
|
||||||
|
|
@ -8494,7 +8496,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