|
|
Alternate PS1 format, and solving resize problems in bash
I've found that when I resize the window in bash and iTerm, a lot of the times the shell will get confused and not figure out the window size correctly. This usually manifests itself when typing out long lines, or using readline up and down to see previous commands. Rather annoying, up until today. Often what I'll do is then do a # TERM=xterm
or whatever and it will then figure it out. With your above tip, I've fixed this issue by just setting the TERM on each prompt command. Not sure if this is the best way to do this, but it seems to work better and I'm not getting prematurely wrapped lines in bash anymore. PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}: ${PWD/#$HOME/~}07"; export TERM=xterm-color'
And, completely unrelated, a decent, Color Bash Prompt: PS1='[e[34;1m]u@[e[31;1m]h [e[0m]w[e[0m] > '
Cobbled from various other sources, gives: user@host cwd > _
Enjoy! --- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.20 seconds |
|