feat: Add configuration for hostname truncation (#485)

This commit is contained in:
Zach Mertes
2019-10-14 12:22:25 -04:00
committed by Matan Kushner
parent 4634449354
commit 5303fd7684
4 changed files with 70 additions and 7 deletions
+9 -7
View File
@@ -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
```