mirror of https://github.com/sigoden/aichat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
407 B
PowerShell
10 lines
407 B
PowerShell
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)
|
|
}
|
|
} |