Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 主题插件
- Import-Module posh-git
- # 设置主题
- oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\powerlevel10k_rainbow.omp.json" | Invoke-Expression
- # 设置别名, py命令, 打开ptipython, 需要装ptipython, pip install ptpython ipython
- Set-Alias -Name py -Value ptipython
- # 命令历史回溯
- Import-Module PSReadLine
- Set-PSReadLineOption -PredictionSource History
- Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward # 上箭头选上一个历史命令
- Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward # 下箭头选下一个历史命令
- Set-PSReadLineKeyHandler -Key "Ctrl+RightArrow" -Function ForwardWord # Ctrl+RightArrow一个个单词往右自动填充
- Set-PSReadLineKeyHandler -Key "Ctrl+f" -Function ForwardWord # 跟上边一样的
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement