Live data from Hacker News

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

starship.rs

141–150 of 216 posts

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

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

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

#143
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 senior, been working in the industry for closing on 25 years now, majority of that dealing with *nix systems of various descriptions. I usually avoid anything "ohh shiny".

I've tried prompts in the past, and they mostly annoyed me, or never showed me useful information. I've been a happy starship user for several years now. I've got the config tweaked so that it only shows me things I specifically care about. It's lightning fast.

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

#144
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…

I like the exit code feature a lot; Starship does that with my config in a subtle color change.

My shell customization is largely throwing Starship in (so it looks the same on all the machines I use -- Ubuntu servers at work, macOS at home, nixOS/Fedora/etc. servers for personal use.) and a starship.toml I wrote once and now leave alone.

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

#145
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 senior, been working in the industry for closing on 25 years now. I usually avoid anything "ohh shiny".

For most of my career I used a very simple PS1:

    export PS1="\[\033[1;32m\][\t \u@\h \w]\\$\[\033[0m\] "
timestamp, who I am, what box I'm on, where I am.

I've tried prompts in the past, and they mostly annoyed me, or never showed me useful information. I've been a happy starship user for several years now. I've got the config tweaked so that it only shows me things I specifically care about. It's lightning fast.

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

#146

I don’t understand why they market this as “minimal”. It’s got loads of features, and every time I see somebody use it they have a huge prompt with loads of bells and whistles. My shell prompt is: : ▶ You don’t need an entire shell prompt customisation framework to be minimal.

You can make it as small as you want. Every single feature can be disabled. At the moment mine is relatively minimal

    format = """
    $username\
    $hostname\
    $shlvl\
    $directory\
    $git_branch\
    $git_commit\
    $git_state\
    $git_metrics\
    $git_status\
    $package\
    $python\
    $rust\
    $env_var\
    $custom\
    $cmd_duration\
    $jobs\
    $time\
    $status\
    $shell\
    $character"""

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

#147
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…

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

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

#148
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 :)

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.

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

#149

I know Starship isn't zsh specific but I guess its tangentially related, does anyone know what the default zsh config is on MacOS? I got quite used to it, and now I'm on linux I'd like to replicate it. The closest I've got is using the eastwood theme on oh-my-zsh but it's not quite the same (I dont even think MacOS using oh-my-zsh out the box, but its got all the nice git stuff)

/etc/zsh:

https://pastebin.com/kjwQ97z1

/etc/zshrc_Apple_Terminal:

https://pastebin.com/kfKF5ych

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

#150
post #31

Earlier quoted context omitted.

Yes. I show the python or node version of currently active venv and venv name. Also, I somehow worked in special characters for Python and other things that get screwed up if I don’t have the right nerd font installed on the system.

How often are you switching these things that you need their values in sight at all times though? Even for cases where I need to use old versions, I don’t need a reminder of that every time I run a command.

All of the time. Often I'm working with 3-4 different project contexts simultaneously.

It isn't that useful but I do glance it when I'm working on dependencies and to ensure the context between a terminal session and pycharm's interpreter match.

The information doesn't cloud the prompt for me though, as it is right justified and I don't really think about time to load, as the machines are relatively recent Apple Silicon.

Post reply on HN