mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-01 15:40:07 +00:00
Added additional ssh identifier for the right statusbar.
This commit is contained in:
parent
15cbe8dbc9
commit
7e25fa1e93
2 changed files with 8 additions and 0 deletions
|
@ -101,6 +101,7 @@ The segments that are currently available are:
|
||||||
* `swap` - Prints the current swap size.
|
* `swap` - Prints the current swap size.
|
||||||
* [`time`](#time) - System time.
|
* [`time`](#time) - System time.
|
||||||
* [`vi_mode`](#vi_mode)- Your prompt's Vi editing mode (NORMAL|INSERT).
|
* [`vi_mode`](#vi_mode)- Your prompt's Vi editing mode (NORMAL|INSERT).
|
||||||
|
* `SSH` - Additional Identifier for SSH Sessions.
|
||||||
|
|
||||||
**Development Environment Segments:**
|
**Development Environment Segments:**
|
||||||
* [`vcs`](#vcs) - Information about this `git` or `hg` repository (if you are in one).
|
* [`vcs`](#vcs) - Information about this `git` or `hg` repository (if you are in one).
|
||||||
|
|
|
@ -670,6 +670,13 @@ prompt_history() {
|
||||||
"$1_prompt_segment" "$0" "$2" "244" "$DEFAULT_COLOR" '%h'
|
"$1_prompt_segment" "$0" "$2" "244" "$DEFAULT_COLOR" '%h'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prompt_detect_ssh(){
|
||||||
|
local color="yellow"
|
||||||
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||||
|
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "$color" "ssh"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Detection for virtualization (systemd based systems only)
|
# Detection for virtualization (systemd based systems only)
|
||||||
prompt_detect_virt() {
|
prompt_detect_virt() {
|
||||||
if ! command -v systemd-detect-virt;then
|
if ! command -v systemd-detect-virt;then
|
||||||
|
|
Loading…
Reference in a new issue