From a873097a5e8dc8afdb30ea862c9e20249b2c81ac Mon Sep 17 00:00:00 2001 From: Sergey Vasin Date: Mon, 3 Aug 2020 02:12:02 +0300 Subject: [PATCH] Add comment in `SamplePSReadLineProfile.ps1` (#1712) --- PSReadLine/SamplePSReadLineProfile.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/PSReadLine/SamplePSReadLineProfile.ps1 b/PSReadLine/SamplePSReadLineProfile.ps1 index 94158eb..9183224 100644 --- a/PSReadLine/SamplePSReadLineProfile.ps1 +++ b/PSReadLine/SamplePSReadLineProfile.ps1 @@ -201,6 +201,7 @@ Set-PSReadLineKeyHandler -Key '"',"'" ` return } + # If cursor is at the start of a token, enclose it in quotes. if ($token.Extent.StartOffset -eq $cursor) { if ($token.Kind -eq [TokenKind]::Generic -or $token.Kind -eq [TokenKind]::Identifier -or $token.Kind -eq [TokenKind]::Variable -or $token.TokenFlags.hasFlag([TokenFlags]::Keyword)) {