Skip to content

Commit b1e5ffb

Browse files
committed
polish doc
1 parent bdc4a96 commit b1e5ffb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/en-US/about_TreeStyle.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The `.EscapeSequence()` method reveals the escape sequence applied to generate s
5454

5555
### Get-PSTree
5656

57-
You can customize the output of `Get-PSTree` by modifying the properties of the `TreeStyle` class, much like you would with PowerShell’s `PSStyle`. This allows you to update colors for directories, files, and specific file extensions, as well as add or remove color schemes for different file types.
57+
You can customize the output of [`Get-PSTree`][5] by modifying the properties of the `TreeStyle` class, much like you would with PowerShell’s `PSStyle`. This allows you to update colors for directories, files, and specific file extensions, as well as add or remove color schemes for different file types.
5858

5959
> [!NOTE]
6060
>
@@ -78,15 +78,15 @@ $palette = $style.Palette
7878
$style.FileSystem.Extension['.ps1'] = $style.CombineSequence($palette.Foreground.White, $palette.Background.Red)
7979
8080
# Add the .cs extension with bold and italic bright cyan text
81-
$style.FileSystem.Extension['.cs'] = $style.ToItalic($style.ToBold, $palette.Foreground.BrightCyan)
81+
$style.FileSystem.Extension['.cs'] = $style.ToItalic($style.ToBold($palette.Foreground.BrightCyan))
8282
8383
# Update the Directory style to use a magenta background
8484
$style.FileSystem.Directory = "`e[45m"
8585
```
8686

8787
> [!TIP]
8888
>
89-
> - PowerShell 6 and later support the `` `e `` escape character for VT sequences. For __Windows PowerShell 5.1__, use `[char] 27` instead. For example, replace ``"`e[45m"`` with `"$([char] 27)[45m"`. See [about_Special_Characters)[3] for more details.
89+
> - PowerShell 6 and later support the `` `e `` escape character for VT sequences. For __Windows PowerShell 5.1__, use `[char] 27` instead. For example, replace ``"`e[45m"`` with `"$([char] 27)[45m"`. See [about_Special_Characters][3] for more details.
9090
> - The `TreeStyle` class provides methods like `.ToItalic()`, `.ToBold()`, and `.CombineSequence()` to apply text accents or combine VT sequences.
9191
> - To reset the `TreeStyle` instance to its default state, use `.ResetSettings()`. If stored in a variable, reassign it afterward, e.g., `$style.ResetSettings()` followed by `$style = Get-PSTreeStyle`.
9292
@@ -99,13 +99,13 @@ After applying these changes, re-running the same `Get-PSTree` command will disp
9999

100100
### Get-PSTreeRegistry
101101

102-
Starting with PSTree version 2.2.3, the `Get-PSTreeRegistry` cmdlet supports customizable coloring via the `PSTree.Style.RegistryStyle` object. This allows you to define colors for both `TreeRegistryKey` and `TreeRegistryValue` instances.
102+
Starting with PSTree version 2.2.3, the [`Get-PSTreeRegistry`][6] cmdlet supports customizable coloring via the `PSTree.Style.RegistryStyle` object. This allows you to define colors for both `TreeRegistryKey` and `TreeRegistryValue` instances.
103103

104104
- __TreeRegistryKey__: The color is set using the `.RegistryKey` property.
105105
- __TreeRegistryValue__: The color is controlled by the `.RegistryValueKind` property, a dictionary that maps [RegistryValueKind][4] types to color settings based on the `.Kind` property of each registry value.
106106

107107
> [!NOTE]
108-
> Keys in `.RegistryValueKind` must be of type [RegistryValueKind][4] or convertible to it. For example, both ``.RegistryValueKind[2] = "`e[45m"`` (where `2` corresponds to `ExpandString` enum value) and ``.RegistryValueKind['ExpandString'] = "`e[45m"`` are valid. Similarly, ``.RegistryValueKind[1] = "`e[45m"`` or ``.RegistryValueKind['String'] = "`e[45m"`` can be used for `String`. String keys must match the enum names exactly, such as `'String'`, `'ExpandString'`, `'Binary'`, etc.
108+
> Keys in `.RegistryValueKind` must be of type [RegistryValueKind][4] or convertible to it. For example, both ``.RegistryValueKind[2] = "`e[45m"`` (where `2` corresponds to `ExpandString` Enum value) and ``.RegistryValueKind['ExpandString'] = "`e[45m"`` are valid. Similarly, ``.RegistryValueKind[1] = "`e[45m"`` or ``.RegistryValueKind['String'] = "`e[45m"`` can be used for `String`. String keys must match the enum names exactly, such as `'String'`, `'ExpandString'`, `'Binary'`, etc.
109109
110110
Here’s the standard output of `Get-PSTreeRegistry` before customization:
111111

@@ -148,3 +148,5 @@ This disables all ANSI-based coloring and formatting, resulting in plain text ou
148148
[2]: ./Get-PSTreeStyle.md
149149
[3]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-7.4
150150
[4]: https://learn.microsoft.com/en-us/dotnet/api/microsoft.win32.registryvaluekind?view=net-9.0
151+
[5]: ./Get-PSTree.md
152+
[6]: ./Get-PSTreeRegistry.md

0 commit comments

Comments
 (0)