mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: add hostname module (#286)
Add a hostname module as requested by @chipbuster. Displays the system hostname as provided by gethostname.
This commit is contained in:
committed by
Matan Kushner
parent
5a0f269d85
commit
84688e4981
@@ -69,6 +69,7 @@ The `default_prompt_order` configuration option is used to define the order in w
|
||||
```
|
||||
default_prompt_order = [
|
||||
"username",
|
||||
"hostname",
|
||||
"directory",
|
||||
"git_branch",
|
||||
"git_status",
|
||||
@@ -268,6 +269,31 @@ renamed = "👅"
|
||||
deleted = "🗑"
|
||||
```
|
||||
|
||||
## Hostname
|
||||
|
||||
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. |
|
||||
| `disabled` | `false` | Disables the `hostname` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
prefix = "⟪"
|
||||
suffix = "⟫"
|
||||
disabled = false
|
||||
```
|
||||
|
||||
## Golang
|
||||
|
||||
The `golang` module shows the currently installed version of Golang.
|
||||
|
||||
Reference in New Issue
Block a user