mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Add configuration for add_newline (#116)
- Replace TableExt with a Config trait that extends toml::value::Table Add configuration for add_newline - add_newline is a root-level configuration value. When set to false, the initial newline before the prompt is removed.
This commit is contained in:
@@ -14,6 +14,9 @@ $ touch ~/.config/starship.toml
|
||||
All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file:
|
||||
|
||||
```toml
|
||||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
|
||||
# Replace the "➜" symbol in the prompt with "❯"
|
||||
[character] # The name of the module we are confguring is "character"
|
||||
symbol = "❯" # The "symbol" segment is being set to "❯"
|
||||
@@ -37,6 +40,24 @@ are segments within it. Every module also has a prefix and suffix that are the d
|
||||
"via " "⬢" "v10.4.1" ""
|
||||
```
|
||||
|
||||
## Prompt
|
||||
|
||||
This is the list of prompt-wide configuration options.
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description|
|
||||
| `add_newline` | `true` | Add a new line before the start of the prompt |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Disable the newline at the start of the prompt
|
||||
add_newline = false
|
||||
```
|
||||
|
||||
## Battery
|
||||
|
||||
The `battery` module shows how charged the device's battery is and its current charging status.
|
||||
|
||||
Reference in New Issue
Block a user