achiurizo / consular

Terminal automation
http://rdoc.info/github/achiu/consular/master/file/README.md
MIT License
813 stars 46 forks source link

Terminal prompt changes #68

Open johnlauck opened 13 years ago

johnlauck commented 13 years ago

When I run terminitor start project all of my tabs/windows open correctly but the prompts are garbled with content like: "% \e]2;terminal\a" and "% \e]2;resque\a" etc.

I'm using zsh and I think it has to do with my terminal color setup. Anyone know how to fix this?

savetheclocktower commented 13 years ago

This happens because zsh sets the window/tab title in a different manner than bash. I've managed to hack this to get it working in my environment (OS X with oh-my-zsh, which gives me a simple title function to change the window title), but I'm trying to figure out how that can be abstracted in a way that assumes nothing about the environment.

mcmire commented 13 years ago

@savetheclocktower You should post the code anyway so at least the fix is out there -- someone can take it from there.

philippbosch commented 13 years ago

@savetheclocktower Please post your fix – even if it's not universal yet.

savetheclocktower commented 13 years ago

Whoops, sorry; missed @mcmire's request way back when.

I got this working in zsh by replacing a line in lib/terminitor/abstract_core.rb:

#tab_content[:commands].insert(0, "PS1=\"$PS1\\[\\e]2;#{tab_name}\\a\\]\"") if tab_name
tab_content[:commands].insert(0, "title \"#{tab_name}\"") if tab_name