add: pwsh: emacs keybindings
explicit cmd/pwsh PSReadLine mode
This commit is contained in:
parent
700fa0ba79
commit
38928f1e21
1 changed files with 5 additions and 1 deletions
|
@ -3,13 +3,17 @@
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
Import-Module PSReadLine # >= 2.2.2
|
Import-Module PSReadLine # >= 2.2.2
|
||||||
Import-Module CompletionPredictor
|
Import-Module CompletionPredictor
|
||||||
|
Set-PSReadLineOption -EditMode Windows
|
||||||
Set-PSReadLineOption -PredictionSource HistoryAndPlugin # require PowerShell ≧ 7.2 and PSReadLine ≧ 2.2.2
|
Set-PSReadLineOption -PredictionSource HistoryAndPlugin # require PowerShell ≧ 7.2 and PSReadLine ≧ 2.2.2
|
||||||
Set-PSReadlineOption -HistoryNoDuplicates
|
Set-PSReadlineOption -HistoryNoDuplicates
|
||||||
Set-PSReadLineOption -DingTone 880 # beep frequency
|
Set-PSReadLineOption -DingTone 880 # beep frequency
|
||||||
|
Set-PSReadLineKeyHandler -Chord "Ctrl+u" -Function BackwardKillInput # like emacs
|
||||||
|
Set-PSReadLineKeyHandler -Chord "Ctrl+p" -Function PreviousHistory # like emacs
|
||||||
|
Set-PSReadLineKeyHandler -Chord "Ctrl+n" -Function NextHistory # like emacs
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function AcceptSuggestion # like fish
|
Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function AcceptSuggestion # like fish
|
||||||
Set-PSReadLineKeyHandler -Chord "Tab" MenuComplete
|
Set-PSReadLineKeyHandler -Chord "Tab" MenuComplete
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+d" DeleteCharOrExit
|
Set-PSReadLineKeyHandler -Chord "Ctrl+d" DeleteCharOrExit
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+g" -ScriptBlock { Invoke-FzfTabCompletion }
|
Set-PSReadLineKeyHandler -Chord "Ctrl+g" -ScriptBlock { Invoke-FzfTabCompletion } -BriefDescription "Fzf tab completion" -Description "Invoke fzf tab completion. Need some input first."
|
||||||
|
|
||||||
# PsFzf Options
|
# PsFzf Options
|
||||||
# 'Ctrl+t' for provider path, 'Ctrl+r' for reverse history
|
# 'Ctrl+t' for provider path, 'Ctrl+r' for reverse history
|
||||||
|
|
Loading…
Reference in a new issue