1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-24 13:47:38 +00:00

docs: clarify missing info in 0.45.0 migration doc (#1714)

This commit is contained in:
Jeff Byrnes 2020-10-01 16:48:14 -04:00 committed by GitHub
parent 7241f4fbf7
commit 476edc4ca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ prefix = "took "
[cmd_duration] [cmd_duration]
# $duration The command duration (e.g. "15s") # $duration The command duration (e.g. "15s")
# $style The default style of the module (e.g. "bold yellow") # $style The default style of the module (e.g. "bold yellow")
format = "took [$duration]($style)" format = "took [$duration]($style) "
``` ```
### Affected Modules ### Affected Modules
@ -98,8 +98,8 @@ format = "took [$duration]($style)"
-- error_symbol = "✖" -- error_symbol = "✖"
-- use_symbol_for_status = true -- use_symbol_for_status = true
-- vicmd_symbol = "" -- vicmd_symbol = ""
++ success_symbol = "[](bold green) " ++ success_symbol = "[](bold green)"
++ error_symbol = "[](bold red) " ++ error_symbol = "[](bold red)"
++ vicmd_symbol = "[](bold green)" ++ vicmd_symbol = "[](bold green)"
``` ```
@ -111,9 +111,11 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur
```toml ```toml
[character] [character]
error_symbol = "[✖](bold red) " error_symbol = "[✖](bold red)"
``` ```
*Note:* The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
#### Command Duration #### Command Duration
| Removed Property | Replacement | | Removed Property | Replacement |
@ -125,7 +127,7 @@ error_symbol = "[✖](bold red) "
```diff ```diff
[cmd_duration] [cmd_duration]
-- prefix = "took " -- prefix = "took "
++ format = "took [$duration]($style)" ++ format = "took [$duration]($style) "
``` ```
#### Directory #### Directory
@ -139,7 +141,7 @@ error_symbol = "[✖](bold red) "
```diff ```diff
[directory] [directory]
-- prefix = "in " -- prefix = "in "
++ format = "[$path]($style)[$read_only]($read_only_style)" ++ format = "[$path]($style)[$read_only]($read_only_style) "
``` ```
#### Environment Variable #### Environment Variable
@ -189,13 +191,13 @@ error_symbol = "[✖](bold red) "
-- prefix = "[" -- prefix = "["
-- suffix = "]" -- suffix = "]"
-- show_sync_count = false -- show_sync_count = false
++ format = "([$all_status$ahead_behind] )" ++ format = "([$all_status$ahead_behind] ) "
``` ```
Previously, the `show_sync_count` property was used to configure the prompt to Previously, the `show_sync_count` property was used to configure the prompt to
show the number of commits the branch was ahead or behind the remote branch. show the number of commits the branch was ahead or behind the remote branch.
With the release of v0.45.0, this has been replaced with the With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
To configure the prompt to use the older `show_sync_count = true` To configure the prompt to use the older `show_sync_count = true`
configuration, set the following to your config file: configuration, set the following to your config file:
@ -252,7 +254,7 @@ behind = "⇣${count}"
[time] [time]
-- format = "🕙[ %T ]" -- format = "🕙[ %T ]"
++ time_format = "%T" ++ time_format = "%T"
++ format = "at 🕙[$time]($style) ++ format = "at 🕙[$time]($style) "
``` ```
#### Custom Commands #### Custom Commands