How to only use oh my zsh in Iterm2, and not all other terminals also?
Asked Answered
D

2

5

After installing oh my zsh and customizing it a little, iTerm2 looks awesome but the default terminal on MacOS looks like crap because it can't load the plugins and I don't want it to. So how can I only use oh-my-zsh on Iterm2?

Disconcert answered 13/12, 2016 at 15:3 Comment(1)
apple.stackexchange.com/questions/191780/… I think here is the same question.Whereabouts
R
7

Sounds difficult to do so. Perhaps you can specify your Terminal to open with bash rather than zsh. Then iterm2 will open with zsh (and oh-my-zsh) and terminal will open with bash.

enter image description here

Rakehell answered 17/3, 2017 at 9:55 Comment(2)
isnt it possible to use zsh on terminal too but without ohmyzsh configurations ?Cretan
@Cretan you can always run some shell manually. If you wanna use zsh without ohmyzsh, remove export ZSH=$HOME/.oh-my-zsh from you .zshrc file and run it manully in 'shells open with command'Rakehell
H
0

Move all the oh-my-zsh configuration from .zshrc to a different file .zshrc-oh-my-zsh (if you have some commands that you have added to .zshrc you can leave them in .zshrc and move only the oh-my-zsh portion to the new file)

And in the original .zshrc file, I had an if check to source that file only if the terminal is iTerm.app

if [[ -n "$TERM_PROGRAM" && "$TERM_PROGRAM" == "iTerm.app" ]]; then
    source ~/.zshrc-oh-my-zsh
fi
Harrow answered 2/10, 2024 at 4:32 Comment(1)
No reason to use -eq with [[ ... ]]; just use = or ==.Rampart

© 2022 - 2025 — McMap. All rights reserved.