Live data from Hacker News

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

starship.rs

121–130 of 216 posts

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

#121

Genuine question for all the people putting timestamps in your prompts: do you never look at your command history and see that they’re all timestamped?

Per the Bash `history` manpage: int history_write_timestamps If non-zero, timestamps are written to the history file, so they can be preserved between sessions. The default value is 0, [...] So this isn't true by default on many machines unless it is explicitly turned on. I could find no command line history for Bash when I poked around. I use the fish shell, however, which does embed timestamp data by default - but…

Aha now that makes some sense. I am a bash user— and I’ll admit my settings are OLD. So old I’ve forgotten the defaults entirely. Thanks for the reminder :)

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

#122

Earlier quoted context omitted.

For personal workstation, the current directory is enough. Maybe I change the color based the status of the last command. That’s pretty much the only information I need before entering any command. Everything else can be accessed when I really need it.

You don't need to know what branch you're on before running commands? I cant tell you the number of times ive been on the wrong branch executing stuff.

As a complete aside, and not to argue with you at all: I think it might change your life to take a good look at jj. I just mention this to try to be helpful to you.

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

#123

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 the command.

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

#125
Can't find the URL again for a funny (and probably universal) custom prompt: you had to do some

    curl  | sh
then you could see on your terminal thousands of various tests related to your installation, then several megabytes being downloaded with progress bars, etc.

At the very end of the whole process, the whole stuff would vanish into writing PS1="$ " at the end of your ~/.bashrc

Of course, the very same prompt was used whatever your install could be. I think it was some joke making fun of all these crazy and heavy custom prompts all around.

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

#126
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 think we can generalize this into the overall computing environment. When I was younger, I was that kid building my whole OS from source via Gentoo, with all the CPU-specific flags and optimizations. I had a very detailed window manager configuration (fwvm2 maybe?), a .bashrc full of aliases and functions for every occasion. And yes, a custom prompt.

I think these kinds of over-optimization rabbit holes are a good learning experience, but I compare it to woodworking. A woodworker just starting out will spend most of his/her time building or refining the tools they need, learning techniques, coming up with ideas/designs and testing them, etc. But eventually the point comes where you have to get Real Work done and the tools and jigs have to wait until the weekend.

Linux is still my favorite desktop OS, but these days I just run Debian and KDE because "free time" is not a thing I have anymore and I care more about getting things done than having the most optimal computing experience.

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

#127
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 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".

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

#128
post #62
post #49

Earlier quoted context omitted.

If you're used to, say, VS Code or the GitHub online editor where the lag between pressing a key on the keyboard and a corresponding character appearing on the screen can be on the order of tens of thousands of milliseconds, then 100 ms will seem like lightning.

There's a thousand milliseconds in a second. If your VSCode is taking +10 seconds to display a single character, it might be time to upgrade from your Commodore 64.

Well, actually, the Commodore 64 is a lot faster with respect to input latency than any modern machine.

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

#130

Looks good, though unfortunately I really can't stand icons in my terminal. It looks pretty, but it smudges meaning and, if you suffer from chronic migraine like me, it makes it incredibly hard to scan.

Agreed, you can replace them easily: https://github.com/LukasKnuth/dotfiles/blob/main/zsh/.config...
Post reply on HN