terminal 终端美化
编辑 PowerShell 配置文件脚本,每次启动之后自动加载
notepad $PROFILE
在配置文件里添加以下行:
oh-my-posh init pwsh --config '$env:POSH_THEMES_PATH\jandedobbeleer.omp.json' | Invoke-Expression
ubuntu 在.bash_profile
文件里
eval "$(oh-my-posh init bash --config '~/.cache/oh-my-posh/themes/aliens.omp.json')"
重新加载配置文件以使更改生效
. $PROFILE
查看所有themes:
Get-PohshThemes
设置选中的themes:
oh-my-posh init pwsh --config 'C:\Users\Lenovo\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json' | Invoke-Expression
设置随机themes:
$theme = Get-ChildItem $env:UserProfile\\AppData\\Local\\Programs\\oh-my-posh\\themes\\ | Get-Random
echo "hello! today's lucky theme is: $theme :)"
oh-my-posh --init --shell pwsh --config $theme.FullName | Invoke-Expression
参考链接:
Themes | Oh My Posh
PowerShell | Oh-My-Posh|
ubuntu 安装看这个 | oh-my-posh
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通