You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en-US/about_TreeStyle.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ The `.EscapeSequence()` method reveals the escape sequence applied to generate s
54
54
55
55
### Get-PSTree
56
56
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.
# Update the Directory style to use a magenta background
84
84
$style.FileSystem.Directory = "`e[45m"
85
85
```
86
86
87
87
> [!TIP]
88
88
>
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.
90
90
> - The `TreeStyle` class provides methods like `.ToItalic()`, `.ToBold()`, and `.CombineSequence()` to apply text accents or combine VT sequences.
91
91
> - 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`.
92
92
@@ -99,13 +99,13 @@ After applying these changes, re-running the same `Get-PSTree` command will disp
99
99
100
100
### Get-PSTreeRegistry
101
101
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.
103
103
104
104
-__TreeRegistryKey__: The color is set using the `.RegistryKey` property.
105
105
-__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.
106
106
107
107
> [!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.
109
109
110
110
Here’s the standard output of `Get-PSTreeRegistry` before customization:
111
111
@@ -148,3 +148,5 @@ This disables all ANSI-based coloring and formatting, resulting in plain text ou
0 commit comments