🏠 https://github.com/microsoft/terminal
Scoop 是 Windows 的命令行安装程序。
⬇ https://github.com/ScoopInstaller/Install
# 获取安装文件
irm get.scoop.sh -outfile 'install.ps1'
# 执行安装(安装文件里有参数说明)
# ScoopDir 是 scoop 的安装目录
# ScoopGlobalDir 是 scoop 全局 app 的安装目录
# Proxy 安装时的代理设置
.\install.ps1 -ScoopDir 'D:\Applications\Scoop' -ScoopGlobalDir 'F:\GlobalScoopApps'# 使用
scoop install coreutilsInstall-Module -Name Terminal-Icons -Repository PSGalleryuse scoop:
scoop bucket add extras
scoop install terminal-iconsSet-ExecutionPolicy Bypass -Scope LocalMachine -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))https://ohmyposh.dev/docs/installation/fonts
oh-my-posh font install相关项目:
Install-Module PSReadLine -Scope AllUsers
Install-Module posh-git -Scope AllUsers
Install-Module yarn-completion -Scope AllUsers
Install-Module npm-completion -Scope AllUsersnotepad $PROFILE$PSDefaultParameterValues['*:Language'] = 'zh-CN'
Import-Module 'E:\development\vcpkg\scripts\posh-vcpkg'
# PSReadLine
Import-Module PSReadLine
# 设置预测性分析引擎,开启智能补全
Set-PSReadLineOption -PredictionSource History
# 设置补全热键,例如Tab
# Set-PSReadLineKeyHandler -Key Tab -Function Complete
# Tab键会出现自动补全菜单
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
# 上下方向键箭头,搜索历史中进行自动补全
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
# oh-my-posh
# 主题设置
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\M365Princess.omp.json" | Invoke-Expression
# (5.x语法)
Set-PoshPrompt -Theme M365Princess
# 文件图标
Import-Module -Name Terminal-Icons
# 自动补全
Import-Module npm-completion
Import-Module yarn-completion
Import-Module posh-git
https://github.com/uutils/coreutils
安装:
# use cargo
cargo install coreutils --features windows
# use scoop
scoop install uutils-coreutils