docs(directory): add missing doc on option directory.repo_root_format (#3550)

* docs : add missing doc on option direcory.repo_root_format

* docs: fix doc format
This commit is contained in:
Pascal H 2022-02-20 18:23:35 +01:00 committed by GitHub
parent a98908f05e
commit 9995eb7922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 13 deletions

View File

@ -841,19 +841,20 @@ it would have been `nixpkgs/pkgs`.
### Options ### Options
| Option | Default | Description | | Option | Default | Description |
| ------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------- | | ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. | | `truncation_length` | `3` | The number of parent folders that the current directory should be truncated to. |
| `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. | | `truncate_to_repo` | `true` | Whether or not to truncate to the root of the git repo that you're currently in. |
| `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. | | `format` | `"[$path]($style)[$read_only]($read_only_style) "` | The format for the module. |
| `style` | `"bold cyan"` | The style for the module. | | `style` | `"bold cyan"` | The style for the module. |
| `disabled` | `false` | Disables the `directory` module. | | `disabled` | `false` | Disables the `directory` module. |
| `read_only` | `"🔒"` | The symbol indicating current directory is read only. | | `read_only` | `"🔒"` | The symbol indicating current directory is read only. |
| `read_only_style` | `"red"` | The style for the read only symbol. | | `read_only_style` | `"red"` | The style for the read only symbol. |
| `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" | | `truncation_symbol` | `""` | The symbol to prefix to truncated paths. eg: "…/" |
| `repo_root_style` | `None` | The style for the root of the git repo when `truncate_to_repo` option is set to false. | | `repo_root_style` | `None` | The style for the root of the git repo. The default value is equivalent to `style`. |
| `home_symbol` | `"~"` | The symbol indicating home directory. | | `repo_root_format` | `"[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "` | The format of a git repo when `repo_root_style` is defined. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) | | `home_symbol` | `"~"` | The symbol indicating home directory. |
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
<details> <details>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary> <summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
@ -890,6 +891,21 @@ a single character. For `fish_style_pwd_dir_length = 2`, it would be `/bu/th/ci/
*: This variable can only be used as a part of a style string *: This variable can only be used as a part of a style string
<details>
<summary>The git repos have additional variables.</summary>
Let us consider the path `/path/to/home/git_repo/src/lib`
| Variable | Example | Description |
| ---------------- | --------------------- | --------------------------------------- |
| before_root_path | `"/path/to/home/"` | The path before git root directory path |
| repo_root | `"git_repo"` | The git root directory name |
| path | `"/src/lib"` | The remaining path |
| style | `"black bold dimmed"` | Mirrors the value of option `style` |
| repo_root_style | `"underline white"` | Style for git root directory name |
</details>
### Example ### Example
```toml ```toml