diff options
Diffstat (limited to 'scripts/shell-integration/integration.ps1')
| -rw-r--r-- | scripts/shell-integration/integration.ps1 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/shell-integration/integration.ps1 b/scripts/shell-integration/integration.ps1 new file mode 100644 index 0000000..6a94189 --- /dev/null +++ b/scripts/shell-integration/integration.ps1 @@ -0,0 +1,10 @@ +Set-PSReadLineKeyHandler -Chord "alt+e" -ScriptBlock { + $_old = $null + [Microsoft.PowerShell.PSConsoleReadline]::GetBufferState([ref]$_old, [ref]$null) + if ($_old) { + [Microsoft.PowerShell.PSConsoleReadLine]::Insert('⌛') + $_new = (aichat -e $_old) + [Microsoft.PowerShell.PSConsoleReadLine]::DeleteLine() + [Microsoft.PowerShell.PSConsoleReadline]::Insert($_new) + } +}
\ No newline at end of file |
