Live data from Hacker News

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

starship.rs

171–180 of 216 posts

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

#171
post #158
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…

> Personally, over time, I have stopped caring too much about prompt customization. For a while, I tried a couple of Christmas tree prompts which included all kinds of condensed Git status and other bells and whistles, but eventually tired of them and settled on: - Exit status of the previous command, if nonzero. - Current time, HH:MM, 24 hour format. - user@host, red if euid 0, green otherwise. - Current directory,…

I'm 90% sure what you described is fish default prompt.

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

#172
post #142

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…

You could probably (I haven’t tested it) append the run time as a comment to the history using something like PROMPT_COMMAND and `history -r <(…)`, instead of cluttering the prompt with it. And the start time is already in the history, using HISTTIMEFORMAT.

This is why I really appreciate tools like Atuin. It augments your history with extra data such as the working directory, exit code, time to run command.

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

#173
post #58

Earlier quoted context omitted.

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.

I literally use just PS1='$ '. `git status` to know git stuff. `pwd` for the current working directory, etc I also don't use aliases like `gs` or `..` One good thing about having a very minimal setup is that you feel at home anywhere. It wasn't always like this. I used many, many prompts and shell tools over the decades. The only tool that stood the test of time is tmux.

"The only tool that stood the test of time is tmux."

tmux comes from BSD rather thsn GNU/Linux, or Windows

What is the default shell in OpenBSD

starship does not support it

   starship init ksh

   ksh is not yet supported by starship.
   For the time being, we support the following shells:
   * bash
   * elvish
   * fish
   * ion
   * powershell
   * tcsh
   * zsh
   * nu
   * xonsh
   * cmd

   Please open an issue in the starship repo if you would like to see support for ksh:
   https://github.com/starship/starship/issues/new

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

#174
post #35
post #15

every time your shell takes 100ms to render git status that you didn’t even need, you're paying invisible tax on flow. terminals should be reactive memory tools, not passive decoration. we optimize for code runtime but not for our own typing latency

Starship is very fast, taking only a couple of milliseconds to gather the data (and you can easily configure it to minimise what it'll spend time gathering). It's night and day compared to other ones I've tried, where the hundred millisecond-ish delays annoyed me.

100ms to render a prompt are meaningless. You can just type commands and run them asynchronously. I do this all the time when a previous command is taking a little extra to complete but I already know what my next command is going to be.

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

#175
post #135
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’m “very senior” (as in decades of _Unix_ use senior) and I like it in minimal mode because it’s just so much less hassle than all the other zsh stuff I had been using for a couple of decades. Not sure if you expected replies to be full of all the JavaScript kids that use emojis in logging messages, but apologies if so :)

Same here. I’ve been using Unix of some flavor or another since 1989 and generally prefer minimalism and simplicity - but I also prefer “opinionated good defaults”, and starship gives me that. (I’ve even switched to Fish, because it does well with no config absolutely basic table stakes stuff OOTB that bash/zsh need a ton of garbage for.)

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

#176
post #148
post #135

Earlier quoted context omitted.

I’m “very senior” (as in decades of _Unix_ use senior) and I like it in minimal mode because it’s just so much less hassle than all the other zsh stuff I had been using for a couple of decades. Not sure if you expected replies to be full of all the JavaScript kids that use emojis in logging messages, but apologies if so :)

It's always nice to have an impromptu HN poll. We may have been missing and didn't know :) And now that you mention it, next year will be my 30th Unix-versary. Time flies... Still not a greybeard though.

30 is not that long in Unix time. Or did you mean your 946708560th?

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

#179
post #32

Earlier quoted context omitted.

Problem is you can't get timestamps and run times of your commands 'when you really need it', unlike almost everything else

As an alternative, perennial HN recommendation atuin ( https://atuin.sh ) logs time, duration and exit code (among other data) for every command. That way you only have to look at it when you need it, and you can also figure out what you were doing last week/month/year if necessary.

After mucking around for an hour trying to get this information into my prompt, I realised atuin already had it.
Post reply on HN