5

I've found plenty of instructions for changing the primary PowerShell prompt (i.e. prompt(); here is an example of one of the many helpful resources: http://blog.dabasinskas.net/customizing-windows-powershell-command-prompt/) which is great, but I haven't been able to find anything concerning how to change the secondary/multi-line prompt (>>), or the Windows equivalent of the $PS2 string on Linux/Unix systems.

Here is an example of a change,

[current_directory] $   `
>>

from >> to $

[current_directory] $   `
$

Thanks.

2 Answers2

0

For PowerShell 7, this is part of the PSReadLine module.

PS C:\> (Get-PSReadLineOption).ContinuationPrompt
>> 
PS C:\> Set-PSReadLineOption -ContinuationPrompt '~~ '
PS C:\> @'
~~ 
Dabombber
  • 436
  • 3
  • 8
-1

You can use the grave accent (or backtick):

PS C:\> Get-Service `
>> -name audiosrv
Kirill Pashkov
  • 3,118
  • 1
  • 15
  • 20
  • It seems you've misunderstood the question; I'm not asking how to _input_ multi-line content, but how to **change** the multi-line prompt string (**>>** by default) in Powershell. – user6678142 Aug 07 '16 at 03:04