Windows & MacOS Terminal美化 & Git Commit Message
Windows Terminal 美化
2022-7-31已无需如此麻烦,请看此网站https://ohmyposh.dev/
设置好后,还需要在PowerShell_profile.ps1文件中添加以下代码(路径:C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1),以在Windows Terminal初始化时能用上主题。
1 | oh-my-posh init pwsh --config $env:POSH_THEMES_PATH\agnoster.omp.json | Invoke-Expression |
https://zhuanlan.zhihu.com/p/76436374(需要注意评论区的代码才能设置主题)https://sspai.com/post/63233目前为止仅有 Hacker Nerd Font 适合 Windows Terminal,其它字体都无法显示图标。
macOS Terminal 美化
Powerline Font 字体
iTerm 2
zsh 替代 bashoh-my-zsh来源:http://lizhiqiang.me/mac_terminal/https://www.jianshu.com/p/e62948cdb472
macOS Terminal 导出的配置路径: Softwares\macOS\Coding
[Solarized Dark Higher Contrast(macOS Terminal setting backup)]
Git Commit Message 设置
如出现以下报错,则使用https://www.cnblogs.com/boyGdm/p/16497848.html此链接🔗中的方法
1 | The config file at "C:\Users\Administrator\.czrc" contains invalid charset, expect utf8 |
conventional-changelog
conventional-changelog-cli
cz-conventional-emoji
commitizen / git-cz(优先选择 git-cz)
- https://segmentfault.com/a/1190000022276650 如果装不上commitizen,必然是 Windows11 出现了问题,需要重置系统…
- https://github.com/streamich/git-cz
并非需要安装 commitizen,而是需要安装 git-cz,才能使用 cz-conventional-emoji
带有 emoji 的 commit 所需 npm 包如下:
1 | cz-conventional-emoji 安装后,Windows & macOS 都需要输入以下 echo 命令 |
1 | 还需要注意,Windows 下使用 PowerShell 执行上面👆 echo 命令时会出错,使用 Git Bash 或 CMD 替代,或自己手动新建 .czrc 文件(.czrc 文件📃路径 C:\Users\Administrator\) |
目前所有终端、代码编辑器我都是用 Hack 字体,除了 win 的终端会出现无法显示 emoji 外,没有任何影响。
VSCode & Pycharm Terminal Font Setting, Windows & macOS
Hack (🥇)
macOS Terminal Font Setting
UbuntuMono Nerd Font (🥇)
Windows 10 Terminal Font Setting
MesloLGS Nerd Font (🥇)(Windows Terminal美化的网站说明文档里有字体的下载)