ITerm Color Scheme | Profile Command

color-themecommand lineiterm2terminal

I'm using prezto with iTerm and in my .zshrc, I have the following line that changes the color scheme:

sh ~/.vim/plugins/gruvbox/gruvbox_256palette_osx.sh

However, sometimes when I click ⌘ + R, I lose the color scheme and I have to execute the command manually. So I was wondering if it was possible to do it automatically.

I've tried putting it into my profile command:

zsh --login && sh ~/.vim/plugins/gruvbox/gruvbox_256palette_osx.sh

However, when I open a new tab of iTerm, I get the error message:

A session ended very soon after starting. Check that the command in profile "Chin" is correct.

Best Answer

Send text at start: field in Settings/General in your iTerm profile.

enter image description here

start it like this:

source "$HOME/.vim/plugins/gruvbox/gruvbox_256palette_osx.sh"

To resolve the "⌘ + r" issue:

Open up preferences (iTerm > Preferences -or- ⌘,)

Under Keys:

  • Under "Key Mappings", add the following, all of which should have an action of ignore:

⌘t, ⌘r, ⌘w

Related Question