update:win_2

This commit is contained in:
dichgrem
2026-01-11 22:34:18 +08:00
parent 02c5b6722d
commit 3331e2f3b1
2 changed files with 60 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ jobs:
- name: Install Zola
uses: taiki-e/install-action@v2
with:
tool: zola
tool: zola@0.21.0
- name: Install Pagefind
run: |

View File

@@ -244,5 +244,64 @@ Windows Registry Editor Version 5.00
"SoftwareOnly"=dword:00000001
```
## powershell强化
- 安装模块
```bash
winget install junegunn.fzf
fzf --version
winget install JanDeDobbeleer.OhMyPosh
oh-my-posh version
winget install ajeetdsouza.zoxide
zoxide --version
```
- 导入模块
```bash
Install-Module PSReadLine -Scope CurrentUser -Force
Install-Module posh-git -Scope CurrentUser -Force
Install-Module PSFzf -Scope CurrentUser -Force
notepad $PROFILE
```
- 写入配置
```bash
# ---------- PSReadLine ----------
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle InlineView
# ---------- Git ----------
Import-Module posh-git
# ---------- fzf ----------
Import-Module PSFzf
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'
# ---------- zoxide ----------
Invoke-Expression (& { (zoxide init powershell | Out-String) })
# ---------- oh-my-posh ----------
oh-my-posh init pwsh | Invoke-Expression
# ---------- Bash-style line editing ----------
# Ctrl+A → 行首
Set-PSReadLineKeyHandler -Key Ctrl+a -Function BeginningOfLine
# Ctrl+E → 行尾
Set-PSReadLineKeyHandler -Key Ctrl+e -Function EndOfLine
# Ctrl+U → 删除从光标到行首
Set-PSReadLineKeyHandler -Key Ctrl+u -Function BackwardDeleteLine
# Ctrl+K → 删除从光标到行尾
Set-PSReadLineKeyHandler -Key Ctrl+k -Function ForwardDeleteLine
```
---
**Done.**