summaryrefslogtreecommitdiffstats
path: root/docs/config/README.md
diff options
context:
space:
mode:
authorNicolas Évrard <nicoe@users.noreply.github.com>2022-12-31 15:53:55 +0100
committerGitHub <noreply@github.com>2022-12-31 15:53:55 +0100
commit8d2256ab1d0ba288fb6ba9b9248bc2210ca01059 (patch)
treef95db36e0a7bee1b41cb589445aa1bbd1d45378e /docs/config/README.md
parent8a8e09dd507b77194c52bb3f2e1826aed2e13390 (diff)
feat(hg_branch): Add support for mercurial topics and find hg root dir (#4771)
* feat(hg_branch): Add support for mercurial topics and find hg root dir * Fix clippy errors * Use crate::utils::read_file * Update config-schema.json * Extend PathExt to retrieve device ID of Path * Break hg root search when switching to another device * Fix clippy and formatting errors * Update docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/modules/utils/path.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/configs/hg_branch.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update hg_branch description * Revert to lazy loading, use truncate_text from utils and use fake topic * Format code and fix clippy error * Revert to previous test string as topic is optional in the config * Fix doc formatting * Stub device_id for windows * Update config-schema.json * Update src/modules/hg_branch.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Do not use unwrap in device_id * Fix formatter error * Use dev under non linux unixes Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Diffstat (limited to 'docs/config/README.md')
-rw-r--r--docs/config/README.md29
1 files changed, 15 insertions, 14 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index f8b27bfd1..1fc4968fe 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -2643,26 +2643,27 @@ style = 'bold dimmed green'
## Mercurial Branch
-The `hg_branch` module shows the active branch of the repo in your current directory.
+The `hg_branch` module shows the active branch and topic of the repo in your current directory.
### Options
-| Option | Default | Description |
-| ------------------- | -------------------------------- | -------------------------------------------------------------------------------------------- |
-| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
-| `style` | `'bold purple'` | The style for the module. |
-| `format` | `'on [$symbol$branch]($style) '` | The format for the module. |
-| `truncation_length` | `2^63 - 1` | Truncates the hg branch name to `N` graphemes |
-| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. |
-| `disabled` | `true` | Disables the `hg_branch` module. |
+| Option | Default | Description |
+| ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------- |
+| `symbol` | `' '` | The symbol used before the hg bookmark or branch name of the repo in your current directory. |
+| `style` | `'bold purple'` | The style for the module. |
+| `format` | `'on [$symbol$branch(:$topic)]($style) '` | The format for the module. |
+| `truncation_length` | `2^63 - 1` | Truncates the hg branch / topic name to `N` graphemes |
+| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. |
+| `disabled` | `true` | Disables the `hg_branch` module. |
### Variables
-| Variable | Example | Description |
-| -------- | -------- | ------------------------------------ |
-| branch | `master` | The active mercurial branch |
-| symbol | | Mirrors the value of option `symbol` |
-| style\* | | Mirrors the value of option `style` |
+| Variable | Example | Description |
+| -------- | --------- | ------------------------------------ |
+| branch | `master` | The active mercurial branch |
+| topic | `feature` | The active mercurial topic |
+| symbol | | Mirrors the value of option `symbol` |
+| style\* | | Mirrors the value of option `style` |
*: This variable can only be used as a part of a style string