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

The prompt style I use was invented, IIRC, by one of the Bell Labs Unix guys in the early days of windowing terminals.

: text;

Why? Because you can select entire lines (triple-click in most terminal emulators) and paste them directly into another shell. “:” is equivalent to true(1), and it ignores its arguments, the text.

(In my case, the text is the base of the host name, but anything compatible with shell quoting rules will work.)



> The prompt style I use was invented, IIRC, by one of the Bell Labs Unix guys in the early days of windowing terminals. : text;

My prompt is two lines. The first line is info line followed by $ prompt on the next line. If I were so inclined, I would simply change the $ to ; or blank. I don't have to choose only one of them, but if that were the case, the verbose prompt would have stayed and ; would have gotten the boot.


This is the best post in the thread so far. I use ";" as a prompt sometimes, because it makes copy-paste easy (like you mention, just triple-click), but I often like to keep track of what directory I'm in. I typically just leave my prompt alone because I work on so many different machines, but this is pretty slick and simple.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: