From 5f41da0788d68524a9e562aa30c47cafd050795b Mon Sep 17 00:00:00 2001 From: kenmorse <63734484+kenmorse@users.noreply.github.com> Date: Thu, 7 Apr 2022 01:40:06 -0400 Subject: [PATCH] docs: add default terminal info --- docs/docs/install-macos.mdx | 2 +- docs/docs/install-prompt.mdx | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/docs/install-macos.mdx b/docs/docs/install-macos.mdx index ff79938f..3f998e03 100644 --- a/docs/docs/install-macos.mdx +++ b/docs/docs/install-macos.mdx @@ -11,7 +11,7 @@ import InstallHomebrew from "./install-homebrew.mdx"; ## Set up your terminal As the standard terminal has issues displaying the ANSI characters correctly, we advise using -[iTerm2][iterm2] or any other modern day MacOS terminal that supports ANSI characters. +[iTerm2][iterm2] or any other modern day macOS terminal that supports ANSI characters. :::info To display all icons, we recommend the use of a [Nerd Font][fonts]. diff --git a/docs/docs/install-prompt.mdx b/docs/docs/install-prompt.mdx index 45f3dabf..b67a23c0 100644 --- a/docs/docs/install-prompt.mdx +++ b/docs/docs/install-prompt.mdx @@ -85,6 +85,18 @@ Add the following to `~/.zshrc`: eval "$(oh-my-posh init zsh)" ``` +:::tip +As the standard terminal has issues displaying the ANSI characters correctly, you might want to skip loading just for that terminal and instead of the line above, place this in your `~/.zshrc`: + +```bash +if [ $TERM_PROGRAM != "Apple_Terminal" ]; then + eval "$(oh-my-posh init zsh)" +fi +``` + +Note this will still load Oh My Posh for [iTerm2][iterm2] or any other modern day macOS terminal that supports ANSI characters. +::: + Once added, reload your profile for the changes to take effect. ```bash @@ -161,3 +173,4 @@ Restart nu shell for the changes to take effect. [clink]: https://chrisant996.github.io/clink/ +[iterm2]: https://www.iterm2.com/