docs: add native_fallback property for mercurial segment

This commit is contained in:
L. Yeung 2024-11-11 11:42:54 +08:00 committed by Jan De Dobbeleer
parent f10c50a0e8
commit f790b02b96
5 changed files with 19 additions and 18 deletions

View file

@ -22,9 +22,9 @@ import Config from '@site/src/components/Config.js';
## Properties ## Properties
| Name | Type | Default | Description | | Name | Type | Default | Description |
| ----------------- | :-------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------- | :-------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `native_fallback` | `boolean` | `false` | when set to `true` and `fossil.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native fossil executable to fetch data. Not all information can be displayed in this case | | `native_fallback` | `boolean` | `false` | when set to `true` and `fossil.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native `fossil` executable to fetch data. Not all information can be displayed in this case |
## Template ([info][templates]) ## Template ([info][templates])

View file

@ -58,7 +58,7 @@ You can set the following properties to `true` to enable fetching additional inf
| `fetch_bare_info` | `boolean` | `false` | fetch bare repo info | | `fetch_bare_info` | `boolean` | `false` | fetch bare repo info |
| `untracked_modes` | `map[string]string` | | map of repo's where to override the default [untracked files mode][untracked]:<ul><li>`no`</li><li>`normal`</li><li>`all`</li></ul>For example `"untracked_modes": { "/Users/me/repos/repo1": "no" }` - defaults to `normal` for all repo's. If you want to override for all repo's, use `*` to set the mode instead of the repo path | | `untracked_modes` | `map[string]string` | | map of repo's where to override the default [untracked files mode][untracked]:<ul><li>`no`</li><li>`normal`</li><li>`all`</li></ul>For example `"untracked_modes": { "/Users/me/repos/repo1": "no" }` - defaults to `normal` for all repo's. If you want to override for all repo's, use `*` to set the mode instead of the repo path |
| `ignore_submodules` | `map[string]string` | | map of repo's where to change the [--ignore-submodules][submodules] flag (`none`, `untracked`, `dirty` or `all`). For example `"ignore_submodules": { "/Users/me/repos/repo1": "all" }`. If you want to override for all repo's, use `*` to set the mode instead of the repo path | | `ignore_submodules` | `map[string]string` | | map of repo's where to change the [--ignore-submodules][submodules] flag (`none`, `untracked`, `dirty` or `all`). For example `"ignore_submodules": { "/Users/me/repos/repo1": "all" }`. If you want to override for all repo's, use `*` to set the mode instead of the repo path |
| `native_fallback` | `boolean` | `false` | when set to `true` and `git.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native git executable to fetch data. Not all information can be displayed in this case | | `native_fallback` | `boolean` | `false` | when set to `true` and `git.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native `git` executable to fetch data. Not all information can be displayed in this case |
| `fetch_user` | [`User`](#user) | `false` | fetch the current configured user for the repository | | `fetch_user` | [`User`](#user) | `false` | fetch the current configured user for the repository |
| `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides. | | `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides. |
| `source` | `string` | `cli` | <ul><li>`cli`: fetch the information using the git CLI</li><li>`pwsh`: fetch the information from the [posh-git][poshgit] PowerShell Module</li></ul> | | `source` | `string` | `cli` | <ul><li>`cli`: fetch the information using the git CLI</li><li>`pwsh`: fetch the information from the [posh-git][poshgit] PowerShell Module</li></ul> |

View file

@ -33,10 +33,11 @@ import Config from "@site/src/components/Config.js";
As doing Mercurial (hg) calls can slow down the prompt experience, we do not fetch information by default. As doing Mercurial (hg) calls can slow down the prompt experience, we do not fetch information by default.
You can set the following properties to `true` to enable fetching additional information (and populate the template). You can set the following properties to `true` to enable fetching additional information (and populate the template).
| Name | Type | Default | Description | | Name | Type | Default | Description |
| ---------------- | :-----------------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------- | :-----------------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fetch_status` | `boolean` | `false` | fetch the local changes | | `fetch_status` | `boolean` | `false` | fetch the local changes |
| `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides | | `native_fallback` | `boolean` | `false` | when set to `true` and `hg.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native `hg` executable to fetch data. Not all information can be displayed in this case |
| `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides |
## Template ([info][templates]) ## Template ([info][templates])

View file

@ -30,11 +30,11 @@ import Config from "@site/src/components/Config.js";
### Fetching information ### Fetching information
| Name | Type | Default | Description | | Name | Type | Default | Description |
| ------------------- | :-----------------: | :-----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------- | :-----------------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fetch_status` | `boolean` | `true` | fetch the local changes - defaults to | | `fetch_status` | `boolean` | `true` | fetch the local changes - defaults to |
| `native_fallback` | `boolean` | `false` | when set to `true` and `sl.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native sapling executable to fetch data. Not all information can be displayed in this case | | `native_fallback` | `boolean` | `false` | when set to `true` and `sl.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native `sl` executable to fetch data. Not all information can be displayed in this case |
| `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides | | `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides |
## Template ([info][templates]) ## Template ([info][templates])

View file

@ -33,11 +33,11 @@ import Config from "@site/src/components/Config.js";
As doing multiple [subversion][svn] calls can slow down the prompt experience, we do not fetch information by default. As doing multiple [subversion][svn] calls can slow down the prompt experience, we do not fetch information by default.
You can set the following properties to `true` to enable fetching additional information (and populate the template). You can set the following properties to `true` to enable fetching additional information (and populate the template).
| Name | Type | Default | Description | | Name | Type | Default | Description |
| ------------------- | :-----------------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------- | :-----------------: | :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fetch_status` | `boolean` | `false` | fetch the local changes | | `fetch_status` | `boolean` | `false` | fetch the local changes |
| `native_fallback` | `boolean` | `false` | when set to `true` and `svn.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native svn executable to fetch data. Not all information can be displayed in this case | | `native_fallback` | `boolean` | `false` | when set to `true` and `svn.exe` is not available when inside a WSL2 shared Windows drive, we will fallback to the native `svn` executable to fetch data. Not all information can be displayed in this case |
| `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides | | `status_formats` | `map[string]string` | | a key, value map allowing to override how individual status items are displayed. For example, `"status_formats": { "Added": "Added: %d" }` will display the added count as `Added: 1` instead of `+1`. See the [Status](#status) section for available overrides |
:::info :::info
The fields `Repo`, `Branch` and `BaseRev` will still work with `fetch_status` set to `false`. The fields `Repo`, `Branch` and `BaseRev` will still work with `fetch_status` set to `false`.