迁移自 Windows Terminal 添加到右键菜单 - J.晒太阳的猫 - 博客园 Windows Ternimal-CSDN博客
提示
内容仅供参考, Windows Terminal 在不断升级,部分内容可能会过时
Windows 终端概述 | Microsoft Learn
Terminal window
wt --help
lextm/windowsterminal-shell: Install/uninstall scripts for Windows Terminal context menu items
Terminal window
# 打开指定目录wt -d %USERPROFILE%
Terminal window
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
一般会自动添加,重启终端即可。如果没有,则进行手动添加。
Terminal window
oh-my-posh font install meslo
不过,发现这样安装的字体,过段时间可能会失效。如果遇到了,可以直接下载字体文件,然后全部安装到系统中。
字体下载:Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher
Change your prompt | Oh My Posh
以 powershell 为例
Terminal window
notepad $PROFILE
# 如果说没有找到文件,则新建一个:New-Item -Path $PROFILE -Type File -Force
Terminal window
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/amro.omp.json" | Invoke-Expression
amro.omp.json
为具体的配置文件名称,可以在 env:POSH_THEMES_PATH
目录中找到,如果没有,使用 Get-PoshThemes
命令获取
如何在 Windows 终端中更改默认目录|windows|应用程序|ubuntu|shell|powershell_网易订阅
"startingDirectory": "%USERPROFILE%\\Desktop"
Windows 终端外观配置文件设置 | Microsoft Learn
https://www.10wallpaper.com/view/Wilderness_Road_Dawn_Shooting_star_United_States_5K.html
https://www.10wallpaper.com/view/Golden_Glare_Lines_Dark_Abstract_Design.html
Terminal window
# 编辑配置文件notepad $PROFILE
# 使用 VS Code 编辑配置文件code $PROFILE
# 应用配置文件. $PROFILE
从 Windows PowerShell 5.1 迁移到 PowerShell 7 - PowerShell | Microsoft Learn
Windows PowerShell 5.1 与 PowerShell 7.x 之间的差异 - PowerShell | Microsoft Learn
Installing PowerShell on Windows - PowerShell | Microsoft Learn
推荐是最新的 PowerShell 7
查看 powershell 版本,使用 $host
命令查看
如果要修改 Windows Ternimal 的默认终端,可以修改 defaultProfile
为对应终端的 guid
Windows terminal美化工具Oh-My-Posh-腾讯云开发者社区-腾讯云
原文链接: https://cloud.tencent.com/developer/article/2481549
本作品采用 「署名 4.0 国际」 许可协议进行许可,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接。