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

What is the best way to have the long directory line above the prompt? Using PS2 or PS3?


I'm not a fan of multiline prompts but I do like knowing where I am, so I trim the path and prepend a "…" character.


Something like "\w\n\$ " should work; mine is more complex by the idea holds, you can have a \n in your PS1 just fine.




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

Search: