From dd474b5177439bf7368940f6adc86268a914bb5a Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Tue, 26 Jul 2022 14:41:30 +0800 Subject: [PATCH] =?UTF-8?q?Add:=20=E7=94=A8=20oh-my-posh=20=E7=BE=8E?= =?UTF-8?q?=E5=8C=96=20Git=20bash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/posts/2022/用 oh-my-posh 美化 Git bash/index.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/posts/2022/用 oh-my-posh 美化 Git bash/index.md b/content/posts/2022/用 oh-my-posh 美化 Git bash/index.md index efb45c8..9d16e9c 100644 --- a/content/posts/2022/用 oh-my-posh 美化 Git bash/index.md +++ b/content/posts/2022/用 oh-my-posh 美化 Git bash/index.md @@ -29,12 +29,19 @@ enableComment: true 2. 下載並安裝字型:[Caskaydia Cove Nerd Font](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/CascadiaCode.zip?WT.mc_id=-blog-scottha) 3. Install OhMyPosh: `winget install JanDeDobbeleer.OhMyPosh` 4. 建立並修改 `~/.profile`,然後加入 - `eval "$(oh-my-posh --init --shell bash --config ~/OneDrive/appConfigs/ohmyposh/themes/montys.omp.json)"` + `eval "$(oh-my-posh --init --shell bash --config ~/montys.omp.json)"` 注意最後的 `montys.omp.json` 就是第一步下載的theme,這邊要改成你自己的路徑。 5. 修改 Windows Terminal 的 `setting.json`,將字型改為 `CaskaydiaCove NF` ![](images/20220614221618_oh-my-posh_setting.png) +6. 重開 Windows Terminal [^1]: 在 [Windows Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) 中設定 Git bash 可以參考:[Windows Terminal's 設定 Git Bash 和 SSH @ 傑克! 真是太神奇了! :: 痞客邦 ::](https://magicjackting.pixnet.net/blog/post/225162505-windows-terminal's-%E8%A8%AD%E5%AE%9A-git-bash-%E5%92%8C-ssh) ## 成果 ![20220614_221915_WindowsTerminal_1244x262.png](images/20220614_221915_WindowsTerminal_1244x262.png) + +## 參考 +- [Oh My Posh](https://ohmyposh.dev/) +- [How to make the ultimate Terminal Prompt on Windows 11 - This video is LONG and WORDY and DETAILED - YouTube](https://www.youtube.com/watch?v=VT2L1SXFq9U) +- [My Ultimate PowerShell prompt with Oh My Posh and the Windows Terminal - Scott Hanselman's Blog](https://www.hanselman.com/blog/my-ultimate-powershell-prompt-with-oh-my-posh-and-the-windows-terminal) +- [Windows-Terminal配置OhMyPosh来美化GitBash_偕臧x的博客-CSDN博客](https://blog.csdn.net/qq_33154343/article/details/120661945)