diff --git a/docs/config/README.md b/docs/config/README.md index 84c3b206..7b2218b1 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 8e419b2d..3a0ea093 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) "