Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I too prefer just PS1='$ ', I want the cursor to be the same distance from the margin every time, to have maximum length for typing without wrapping, and the ability to put in a few separator lines between command output by just tapping Return.

However, for your problem, have you considered the terminal's title instead of the top line of the tty? printf '\033]0;foo\007'



Mine has a bunch of info, then a newline, then ' $'. Being able to see the current git branch is just too useful to drop, but I moving random distances out from the margin between commands.


Hmm, that wouldn't let me keep the colors etc. I'm on iTerm btw, perhaps you mean the title in a screen/tmux session?


No, I meant the window's furniture so no colours. I agree, a tty-wrapper, like tmux, would provide another option.  I don't suppose there are terminals generally about where `tput hs' is true. Have you considered using the end of the prompt line for status, returning to the left for the "$ ", and being happy to do readline's redraw-current-line if you don't like the overwrite should you reach that far?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: