feat: Add support for RPROMPT (right prompt) (#3026)

Adds support for zsh, fish, and elvish.

Co-authored-by: Matan Kushner <hello@matchai.dev>
This commit is contained in:
Matthew (Matt) Jeffryes
2021-09-08 12:45:27 -07:00
committed by GitHub
parent cb8dca2101
commit 79585dcb17
11 changed files with 180 additions and 37 deletions
+16 -6
View File
@@ -151,12 +151,14 @@ This is the list of prompt-wide configuration options.
### Options
| Option | Default | Description |
| ----------------- | ------------------------------ | ------------------------------------------------------------ |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| Option | Default | Description |
| ----------------- | ------------------------------- | ---------------------------------------------------------------- |
| `format` | [link](#default-prompt-format) | Configure the format of the prompt. |
| `right_format` | `""` | See [Enable Right Prompt](/advanced-config/#enable-right-prompt) |
| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). |
| `command_timeout` | `500` | Timeout for commands executed by starship (in milliseconds). |
| `add_newline` | `true` | Inserts blank line between shell prompts. |
### Example
@@ -247,6 +249,14 @@ $shell\
$character"""
```
If you just want to extend the default format, you can use `$all`;
modules you explicitly add to the format will not be duplicated. Eg.
```toml
# Move the directory to the second line
format="$all$directory$character"
```
## AWS
The `aws` module shows the current AWS region and profile. This is based on