We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6324b0 commit 7e5dd15Copy full SHA for 7e5dd15
Public/Disable-AIShortCutKey.ps1
@@ -1,11 +1,20 @@
1
function Disable-AIShortCutKey {
2
<#
3
.SYNOPSIS
4
- Disable the Ctrl+g shortcut key for getting completions
5
-
+ Disable the shortcut key for getting completions
+ .DESCRIPTION
6
+ Disable the shortcut key for completing suggestions.
7
.EXAMPLE
- Disable-AIShortCutKey
8
+ Disable-AIShortCutKey
9
+ .LINK
10
+ Enable-AIShortCutKey
11
#>
12
- Remove-PSReadLineKeyHandler -Chord Ctrl+g
13
+ $chordsToRemove = Get-PSReadLineKeyHandler |
14
+ Where-Object Function -eq OpenAICli |
15
+ Select-Object -ExpandProperty Key
16
+
17
+ foreach ($chordToRemove in $chordsToRemove) {
18
+ Remove-PSReadLineKeyHandler -Chord $chordToRemove
19
+ }
20
}
0 commit comments