diff options
-rw-r--r-- | docs/config/README.md | 11 | ||||
-rw-r--r-- | docs/migrating-to-0.45.0/README.md | 31 |
2 files changed, 34 insertions, 8 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 84c3b2065..7b2218b1d 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -1120,7 +1120,6 @@ current directory. | `staged` | `"+"` | The format of `staged` | | `renamed` | `"ยป"` | The format of `renamed` | | `deleted` | `"โ"` | The format of `deleted` | -| `show_sync_count` | `false` | Show ahead/behind count of the branch being tracked. | | `style` | `"bold red"` | The style for the module. | | `disabled` | `false` | Disables the `git_status` module. | @@ -1174,6 +1173,16 @@ renamed = "๐
" deleted = "๐" ``` +Show ahead/behind count of the branch being tracked +```toml +# ~/.config/starship.toml + +[git_status] +ahead = "โก${count}" +diverged = "โโก${ahead_count}โฃ${behind_count}" +behind = "โฃ${count}" +``` + ## Golang The `golang` module shows the currently installed version of Golang. diff --git a/docs/migrating-to-0.45.0/README.md b/docs/migrating-to-0.45.0/README.md index 8e419b2d0..3a0ea093d 100644 --- a/docs/migrating-to-0.45.0/README.md +++ b/docs/migrating-to-0.45.0/README.md @@ -137,7 +137,7 @@ error_symbol = "[โ](bold red) " **Changes to the Default Configuration** ```diff -[cmd_duration] +[directory] -- prefix = "in " ++ format = "[$path]($style)[$lock_symbol]($lock_style)" ``` @@ -152,7 +152,7 @@ error_symbol = "[โ](bold red) " **Changes to the Default Configuration** ```diff -[cmd_duration] +[env_var] -- prefix = "" -- suffix = "" ++ format = "with [$env_value]($style) " @@ -168,7 +168,7 @@ error_symbol = "[โ](bold red) " **Changes to the Default Configuration** ```diff -[cmd_duration] +[git_commit] -- prefix = "(" -- suffix = ")" ++ format = "[\\($hash\\)]($style) " @@ -180,16 +180,33 @@ error_symbol = "[โ](bold red) " | ------------------- | ----------- | | `prefix` | `format` | | `suffix` | `format` | +| `show_sync_count` | `format` | **Changes to the Default Configuration** ```diff -[cmd_duration] +[git_status] -- prefix = "[" -- suffix = "]" +-- show_sync_count = false ++ 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 + +To configure the prompt to use the older `show_sync_count = true` +configuration, set the following to your config file: + +```toml +[git_status] +ahead = "โก${count}" +diverged = "โโก${ahead_count}โฃ${behind_count}" +behind = "โฃ${count}" +``` + #### Hostname | Deprecated Property | Replacement | @@ -200,7 +217,7 @@ error_symbol = "[โ](bold red) " **Changes to the Default Configuration** ```diff -[cmd_duration] +[hostname] -- prefix = "" -- suffix = "" ++ format = "[$hostname]($style) in " @@ -217,7 +234,7 @@ error_symbol = "[โ](bold red) " **Changes to the Default Configuration** ```diff -[cmd_duration] +[singularity] -- prefix = "" -- suffix = "" ++ format = "[$symbol\\[$env\\]]($style) " @@ -248,7 +265,7 @@ error_symbol = "[โ](bold red) " **Changes to the Default Configuration** ```diff -[cmd_duration] +[custom.example] -- prefix = "" -- suffix = "" ++ format = "[$symbol$output]($style) " |