Compare commits
4 Commits
93dd8f86fb
...
f1a0162e07
| Author | SHA1 | Date |
|---|---|---|
|
|
f1a0162e07 | |
|
|
7ff836131a | |
|
|
7563f920c7 | |
|
|
4fc7271244 |
|
|
@ -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
|
||||||
|
|
@ -8490,6 +8492,12 @@ _p9k_init_ssh() {
|
||||||
if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then
|
if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then
|
||||||
P9K_SSH=1
|
P9K_SSH=1
|
||||||
return 0
|
return 0
|
||||||
|
elif [[ \
|
||||||
|
$(grep -i Microsoft /proc/version) && \
|
||||||
|
$(cmd.exe /c 'echo %SSH_CLIENT%' 2>/dev/null | sed $'s/\r//' | grep ' 22$') \
|
||||||
|
]]; then
|
||||||
|
P9K_SSH=1
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue