Live data from Hacker News

Starship: A minimal, fast, and customizable prompt for any shell

starship.rs

181–190 of 216 posts

Re: Starship: A minimal, fast, and customizable prompt for any shell

#181
post #168
post #109

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 for…

I've been coding for 20 years, I very much like having git info in the prompt. Even if it doesn't tell me everything (and it often doesn't) it _is_ a reminder that I have uncommitted changes, or haven't pushed yet, or a stash that I might have forgotten about. I played with Starship for an hour this morning - the joys of 50 person planning meetings - but ultimately uninstalled it. I did like some of its options like…

Choosing which segments to show is the main the to configure. It's even one of the preset example to hide versions: https://starship.rs/presets/no-runtimes

I agree there's a lot of noise that seems to be there by default.

Re: Starship: A minimal, fast, and customizable prompt for any shell

#182
post #109

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 for…

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 comm…

This and command duration if the command ran longer than 10 seconds are the most useful things to add.

Re: Starship: A minimal, fast, and customizable prompt for any shell

#183
post #109

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 for…

I hope to not age out of trying out new tools other people like!

Re: Starship: A minimal, fast, and customizable prompt for any shell

#184

Ignore the haters - I too am a fan of minimalism in my terminal since I don't appreciate unnecessary clutter or decoration, but context is king and Starship can be configured as such. By default my prompt is a shows me the current directory, the time, and a single character '%'. If I set something in my environment for which I need to be contextually aware - i.e if I have KUBECONFIG or OS_CLOUD - then the prompt is u…

I also have very few always on segments, and many conditional segments that only show up when useful. Host shows when I'm not on the usual, user when I'm not me, and stuff like that.

Re: Starship: A minimal, fast, and customizable prompt for any shell

#185

Earlier quoted context omitted.

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 comm…

Oh, how do you automate that? I usually add a "& say done | say failed" to long-running tasks if I remember to do it.

https://github.com/thanatos/dotfiles/blob/master/shell/zsh/p...

That was my prompt when it was written in zsh. Sort of like TFA, I've since moved to Rust:

https://github.com/thanatos/dotfiles/blob/master/zsh-prompt-...

I think (if I am reading TFA's code right) unlike the article, I'm using zsh's module functionality, so the Rust here is a .so that is loaded directly into the shell's memory. (I.e., I do not have to fork/exec a separate Rust bin to compute the prompt, though I think zsh might fork-but-not-exec for computing the prompt itself.)

The latter is, of course, somewhat more complicated in some senses. (Esp. on macOS, which work forces me to use, where dlopen(2) is just utterly insane.)

Re: Starship: A minimal, fast, and customizable prompt for any shell

#186
post #147

Earlier quoted context omitted.

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 comm…

That's useful indeed. Did you custom-code it, or is it e.g. an ohmyzsh plugin or something?

I custom coded it. (Details: https://news.ycombinator.com/item?id=44373575)

Re: Starship: A minimal, fast, and customizable prompt for any shell

#187

Too bad that we still use text based shells in the year 2025. We should have come up with a graphical shell that is as powerful and flexible two decades ago.

text is discrete, graphical is continuous. very different psychologically. i disagree with you wholeheartedly.

Re: Starship: A minimal, fast, and customizable prompt for any shell

#188
post #8

Tried it. Not a fan. I find it unnecessarily fancy.

Then customize it not to be. Are you criticizing it for having too many configuration options?

If I have to do that I might as well maintain my current zsh config with antigen.

I criticized it because it's not "minimal" and it's not "blazing-fast".

Re: Starship: A minimal, fast, and customizable prompt for any shell

#190

I like maximalist prompts, and indeed Starship is what Shell Bling Ubuntu [1] installs on a new dev machine. But they're not everyone's cup of tea. If I wanted to recommend to someone the min-maxed, highest density thing they could add to their prompt, it would simply be the time your current prompt appeared + the amount of time the last command you ran took. These two pieces of information together make it very easy…

nushell does that out of the box: > history | get 82076 ╭─────────────────┬──────────────────╮ │ start_timestamp │ 2025-06-24 16:46 │ │ command │ mpc play │ │ cwd │ /home/work │ │ duration │ 1ms │ │ exit_status │ 0 │ ╰─────────────────┴──────────────────╯ It's really nice, because it doesn't just tell you time between command executions (or rather time between commands finishing), but the actual runtime duration of t…

I love nushell. You can also query by friendlier things than index:

     history | where exit_status == 127 | last | get duration
    2sec 410ms
The syntax ends up very clean looking since the data going through the pipes is typed, and the error messages are top notch

      × Types 'duration' and 'int' are not compatible for the '-' operator.
       ╭─[entry #47:1:2]
     1 │ (history | where exit_status == 127 | last | get duration) - 10
       ·  ───┬───                                                   ┬ ─┬
       ·     │                                                      │  ╰── int
       ·     │                                                      ╰── does not operate between 'duration' and 'int'
       ·     ╰── duration
       ╰────
(fingers crossed hn doesn't mangle that...)
Post reply on HN