Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
d949be12c6
3 changed files with 19 additions and 6 deletions
|
@ -26,8 +26,15 @@ Install-Module -Name posh-git
|
||||||
Write-Output "Pscx"
|
Write-Output "Pscx"
|
||||||
Install-Module -Name Pscx -AllowPrerelease
|
Install-Module -Name Pscx -AllowPrerelease
|
||||||
Write-Output "z"
|
Write-Output "z"
|
||||||
Install-Module -Name z
|
Install-Module -Name ZLocation
|
||||||
|
Write-Output "PSFzf"
|
||||||
Install-Module -Name PSFzf -RequiredVersion 2.5.10
|
Install-Module -Name PSFzf -RequiredVersion 2.5.10
|
||||||
|
Write-Output "Latest PSReadLine"
|
||||||
|
Install-Module -Name PSReadLine -Force # Override default version to get the latest one
|
||||||
|
Write-Output "CompletionPredictor"
|
||||||
|
Install-Module -Name CompletionPredictor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# install scoop
|
# install scoop
|
||||||
if(!(Get-Command scoop -ErrorAction SilentlyContinue)) {
|
if(!(Get-Command scoop -ErrorAction SilentlyContinue)) {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
some notable features
|
some notable features
|
||||||
|
|
||||||
## Key-Bindings
|
## Key-Bindings
|
||||||
|
- `F2` to toggle InlineView and ListView of predictions
|
||||||
- tab completion like fish
|
- tab completion like fish
|
||||||
- `Ctrl + D` to exit
|
- `Ctrl + D` to exit
|
||||||
- `Ctrl + G` to Invoke-FzfTabCompletion
|
- `Ctrl + G` to Invoke-FzfTabCompletion
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
# PSReadLine Settings
|
# PSReadLine Settings
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
Import-Module PSReadLine
|
Import-Module PSReadLine # >= 2.2.2
|
||||||
Set-PSReadLineOption -PredictionSource History
|
Import-Module CompletionPredictor
|
||||||
|
Set-PSReadLineOption -EditMode Windows
|
||||||
|
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+f" -Function ForwardWord # like fish
|
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 "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