←back to thread

457 points benoitg | 2 comments | | HN request time: 0s | source
Show context
m000 ◴[] No.44367731[source]
I would be very curious to see an age demographic chart of people using e.g. Starship.

Personally, over time, I have stopped caring too much about prompt customization. I concluded that, no matter how carefully you curate your prompt, 90% of the information shown will be irrelevant 90% of the time*. After a while, your brain will start perceiving this as visual clutter and filter it out, to the point you may even forget the information is there, right in front of your eyes.

And for the things that matter, you probably need more details than any prompt can show you. E.g. are there changes in your git branch? Ok there are, good to know, but which files have changed? Just knowing that there are changes is not really actionable information. You need to run additional commands to get actionable details.

* the numbers are completely arbitrary, but you get the picture

replies(12): >>44368415 #>>44368447 #>>44368864 #>>44369236 #>>44369278 #>>44370150 #>>44370843 #>>44371011 #>>44371393 #>>44373149 #>>44376069 #>>44385108 #
deathanatos ◴[] No.44368447[source]
As a counterpoint, one of the most useful customizations I've made to my prompt is to emit the exit status of the prior command. Knowing that something failed is a useful signal, esp. when sometimes the thing failing just fails to emit any output that indicates that it failed.

I only emit it if the prior command fails, too, so it doesn't clutter things the 90% of the time things are working.

  » true
  » false
  (last command returned 1.)
  » 
I also translate signals, so I get "last command exited on SIGSEGV", or so.

It's also useful the other way: when a program emits and error and exits with "success".

replies(4): >>44369265 #>>44369378 #>>44369845 #>>44373145 #
1. m000 ◴[] No.44369378[source]
That's useful indeed. Did you custom-code it, or is it e.g. an ohmyzsh plugin or something?
replies(1): >>44373577 #
2. deathanatos ◴[] No.44373577[source]
I custom coded it. (Details: https://news.ycombinator.com/item?id=44373575)