Hacker News new | past | comments | ask | show | jobs | submit login

This is such a wonderful little hack, I've placed it into my .bashrc. Thank you!

I did actually modify it a little bit, got rid of the two beginning %s in favor of ⏎. It's not a character I expect to really happen to end legitimate output of a program, so it seems more than good enough to keep it from being accidentally intended.




Apply some attributes to it if you want it to be clearer that it isn't part of the legitimate output of a program. This is why the zsh default is a % in standout.

And for zsh user's if you have a setup where unicode fonts can be replied upon, `PROMPT_EOL_MARK` can be set to change the mark. It allows all the usual zsh prompt expansions for stuff like coloring.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: