Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Clarify missing info in 0.45.0 migration doc #1714

Merged
merged 1 commit into from Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 11 additions & 9 deletions docs/migrating-to-0.45.0/README.md
Expand Up @@ -76,7 +76,7 @@ prefix = "took "
[cmd_duration]
# $duration – The command duration (e.g. "15s")
# $style – The default style of the module (e.g. "bold yellow")
format = "took [$duration]($style)"
format = "took [$duration]($style) "
```

### Affected Modules
Expand All @@ -98,8 +98,8 @@ format = "took [$duration]($style)"
-- error_symbol = "✖"
-- use_symbol_for_status = true
-- vicmd_symbol = "❮"
++ success_symbol = "[❯](bold green) "
++ error_symbol = "[❯](bold red) "
++ success_symbol = "[❯](bold green)"
++ error_symbol = "[❯](bold red)"
++ vicmd_symbol = "[❮](bold green)"
```

Expand All @@ -111,9 +111,11 @@ To configure the prompt to use the older `use_symbol_for_status = true` configur

```toml
[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

| Removed Property | Replacement |
Expand All @@ -125,7 +127,7 @@ error_symbol = "[✖](bold red) "
```diff
[cmd_duration]
-- prefix = "took "
++ format = "took [$duration]($style)"
++ format = "took [$duration]($style) "
```

#### Directory
Expand All @@ -139,7 +141,7 @@ error_symbol = "[✖](bold red) "
```diff
[directory]
-- prefix = "in "
++ format = "[$path]($style)[$read_only]($read_only_style)"
++ format = "[$path]($style)[$read_only]($read_only_style) "
```

#### Environment Variable
Expand Down Expand Up @@ -189,13 +191,13 @@ error_symbol = "[✖](bold red) "
-- prefix = "["
-- suffix = "]"
-- 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
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`
configuration, set the following to your config file:
Expand Down Expand Up @@ -252,7 +254,7 @@ behind = "⇣${count}"
[time]
-- format = "🕙[ %T ]"
++ time_format = "%T"
++ format = "at 🕙[$time]($style)
++ format = "at 🕙[$time]($style) "
```

#### Custom Commands
Expand Down