mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Add configuration for hostname truncation (#485)
This commit is contained in:
committed by
Matan Kushner
parent
4634449354
commit
5303fd7684
@@ -543,13 +543,14 @@ The `hostname` module shows the system hostname.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------------- | ---------------------------------------------------- |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `prefix` | `""` | Prefix to display immediately before the hostname. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the hostname. |
|
||||
| `style` | `"bold dimmed green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `ssh_only` | `true` | Only show hostname when connected to an SSH session. |
|
||||
| `prefix` | `""` | Prefix to display immediately before the hostname. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the hostname. |
|
||||
| `trim_at` | `"."` | String that the hostname is cut off at, after the first match. `"."` will stop after the first dot. `""` will disable any truncation |
|
||||
| `style` | `"bold dimmed green"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -560,6 +561,7 @@ The `hostname` module shows the system hostname.
|
||||
ssh_only = false
|
||||
prefix = "⟪"
|
||||
suffix = "⟫"
|
||||
trim_at = ".companyname.com"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user