@@ -18,7 +18,7 @@ Set-PSReadLineOption
18
18
[-HistorySaveStyle <HistorySaveStyle>]
19
19
[-HistoryNoDuplicates]
20
20
[-HistorySearchCaseSensitive]
21
- [-PromptText <string >]
21
+ [-PromptText <String[] >]
22
22
[-ExtraPromptLineCount <Int32>]
23
23
[-Colors <Hashtable>]
24
24
[-AddToHistoryHandler <Func[String, Object]>]
@@ -32,7 +32,7 @@ Set-PSReadLineOption
32
32
[-DingDuration <Int32>]
33
33
[-BellStyle <BellStyle>]
34
34
[-CompletionQueryItems <Int32>]
35
- [-WordDelimiters <string >]
35
+ [-WordDelimiters <String >]
36
36
[-AnsiEscapeTimeout <int>]
37
37
[-ViModeIndicator <ViModeStyle>]
38
38
[-ViModeChangeHandler <ScriptBlock>]
@@ -85,10 +85,10 @@ This example emits a cursor change VT escape in response to a vi mode change:
85
85
PS C:\> function OnViModeChange {
86
86
if ($args[0] -eq 'Command') {
87
87
# Set the cursor to a blinking block.
88
- Write-Host -NoNewLine "`e [1 q"
88
+ Write-Host -NoNewLine "$([char]0x1b) [1 q"
89
89
} else {
90
90
# Set the cursor to a blinking line.
91
- Write-Host -NoNewLine "`e [5 q"
91
+ Write-Host -NoNewLine "$([char]0x1b) [5 q"
92
92
}
93
93
}
94
94
PS C:\> Set-PSReadLineOption -ViModeIndicator Script -ViModeChangeHandler OnViModeChange
@@ -136,11 +136,14 @@ For example, if my prompt function looked like:
136
136
137
137
Then set:
138
138
139
- Set-PSReadLineOption -PromptText "# "
139
+ Set-PSReadLineOption -PromptText "# ", "! "
140
+
141
+ This would change the "#" in your prompt to "!" when a parse error is detected. This is especially useful with
142
+ virtual terminal escape sequences to use colors in your prompt.
140
143
141
144
142
145
` ` ` yaml
143
- Type : String
146
+ Type : String[]
144
147
Parameter Sets : (All)
145
148
Aliases :
146
149
0 commit comments