fix: re-add add_newline to root config (#1598)

This commit is contained in:
Matan Kushner
2020-08-18 12:58:29 -04:00
committed by GitHub
parent 8c48e0f707
commit 09672eeea7
3 changed files with 12 additions and 14 deletions
+6 -13
View File
@@ -1,12 +1,5 @@
# Configuration
::: tip
🔥 Configuration is currently being worked on.
Many new configuration options will be available in coming releases.
:::
To get started configuring starship, create the following file: `~/.config/starship.toml`.
```sh
@@ -14,10 +7,9 @@ mkdir -p ~/.config && 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
format = "$all"
add_newline = false
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
@@ -147,15 +139,13 @@ This is the list of prompt-wide configuration options.
| -------------- | ------------------------------ | ----------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `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
format = "$all"
# Use custom format
format = """
[┌───────────────────>](bold green)
@@ -164,6 +154,9 @@ format = """
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
# Disable the newline at the start of the prompt
add_newline = false
```
### Default Prompt Format
@@ -171,7 +164,7 @@ scan_timeout = 10
The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
format = "\n$all"
format = "$all"
# Which is equivalent to
format = """