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

Author here. Thanks for the fascinating insights! I've updated the post to link to your comment.

PS: I worked with @ridiculousfish up until recently, say hi from me ^^




Thanks for the post! These things absolutely should be documented and dissected in posts like your; there’s way too much voodoo in dealing with terminals.


Woo! I have the same trick in my .bashrc, love to see it spread.

If you can, please add a note that if you want to add it to bash you _have_ to use an echo/printf from PROMPT_CMD, if you add it to PS1 bash's (or readline's?) own logic will get confused as to how long the prompt is and what column the cursor is at.

(If anyone wants to try it, personally the only caveat i noticed is that when you copy a command from the terminal window any spaces not overwritten by something else will appear in the output.)




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

Search: