mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(hostname): add ssh_symbol for ssh connections (#3806)
This commit is contained in:
committed by
GitHub
parent
3ced500c87
commit
2bf30dc89f
+14
-12
@@ -1805,20 +1805,22 @@ The `hostname` module shows the system hostname.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
|
||||
| `format` | `"[$hostname]($style) in "` | The format for the module. |
|
||||
| `style` | `"bold dimmed green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `ssh_symbol` | `"🌐 "` | A format string representing the symbol when connected to SSH session. |
|
||||
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
|
||||
| `format` | `"[$ssh_symbol$hostname]($style) in "` | The format for the module. |
|
||||
| `style` | `"bold dimmed green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | ---------- | ----------------------------------- |
|
||||
| hostname | `computer` | The hostname of the computer |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| Variable | Example | Description |
|
||||
| ---------- | ---------- | ----------------------------------------------------- |
|
||||
| hostname | `computer` | The hostname of the computer |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
| ssh_symbol | `"🌏 "` | The symbol to represent when connected to SSH session |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1829,7 +1831,7 @@ The `hostname` module shows the system hostname.
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
format = "on [$hostname](bold red) "
|
||||
format = "[$ssh_symbol](bold blue) on [$hostname](bold red) "
|
||||
trim_at = ".companyname.com"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user