Search

Text

oh-my-zsh: remove username and hostname from title

I know I’m dip. I know I’m on my BlackBook. This window title is TERRIBLE, and its even worse as a tab title. Since I couldn’t google a way to fix it, I tried to fix it myself, and here’s how I finally did it.

Create a custom.zsh file in ~/.oh-my-zsh/custom/ and add:

preexec () { print -Pn "\e]0;$1\a" }
precmd () { print -Pn "\e]0;%~\a" }

These will override the functions in termsupport.zsh and remove the username and host information from the title.

Way better :)

Credits

© Copyright

Wordpress by Press75 & Jason Schuller Tumblr by Brand. Build. Sell.