from Hacker News

Starship.rs: minimal, fast prompt for any shell

by highmastdon on 1/25/24, 7:09 PM with 155 comments

  • by juxtapose on 1/26/24, 6:38 AM

    I've been using Starship for quite some time, and it's awesome! Definitely recommend it to anyone who wants a fast, modern, and rich prompt.

    Besides the product, the community is pleasantly awesome as well. I've contributed a module to it and the maintainer has done a good job reviewing and testing. Heck, they even have a Discord server for contributors.

  • by neilv on 1/26/24, 7:42 AM

    The "minimal" part is a little funny. Historical minimal shell prompts:

        $
        #
        %
        >
  • by Narushia on 1/26/24, 10:17 AM

    My interactive shell experience has substantially improved after installing Starship. :) The other thing was changing from Bash to Fish.
  • by lazypenguin on 1/26/24, 1:48 AM

    I discovered starship when I started using kubernetes at work. Previously I relied on standard bash-isms for path, hostname, etc. but knowing what context and namespace I'm in before I execute a command is quite convenient. I'm normally not one to "customize" my CLI experience at all but this was a nice addition to the toolbox. Documentation is good, customizable, reliable and has support for a lot of things. Would recommend.
  • by weebull on 1/26/24, 10:14 AM

    Am I the only one who is getting tired of "It's X in rust" type projects? It's making me dislike the community.

    Rust is not a user feature, it's an implementation detail.

    <cue people telling me I should consider Rust a feature>

  • by rgoulter on 1/26/24, 1:40 AM

    Starship's an excellent prompt replacement.

    I think it goes well with the fish shell: it's much nicer than the default, without requiring customisation.

  • by srid on 1/26/24, 9:23 AM

    If you use home-manager, installing starship is as simple as adding `programs.starship.enable = true;`.

    https://github.com/srid/nixos-config/blob/master/home/starsh...

    Incidentally, starship also gives a visual indication of whether you are in the nix shell or not, which is pretty handy when using direnv:

    https://nixos.asia/en/direnv

  • by myaccountonhn on 1/26/24, 1:43 AM

    I’m probably on the wrong side of history, but I just don’t like how much color there is in modern cli tools. It is distracting
  • by usrbinbash on 1/26/24, 11:21 AM

    > "minimal"

    Here is what a minimal shell prompt looks like:

        $
    
    Here is another one which only uses the shells own facilities:

        current-directory@hostname $
    
    Running a complex piece of software every time the shell needs to display it's prompt, is not "minimal", regardless of how fast and well written said piece of software is.
  • by tecoholic on 1/26/24, 1:49 AM

    Installed it yesterday and it threw my email and AWS default region on to the prompt. Pretty bad defaults. Promptly removed it.
  • by joshstrange on 1/26/24, 10:34 AM

    I spend so little time relatively on my own machine’s terminal and even when I do I don’t want it to be totally different from the boxes I SSH into every day. That context switch would be frustrating. Nor do I have the desire to push for something like this to be installed on our fleet of servers.

    Do the people who use this (along with terminal emulators that require you install things on the host to get the full power) just not use other machines and/or install stuff like this on them? Just seems odd to me personally but I’m interested in how others use it. Do you only use your own computer/terminal so it’s not an issue?

  • by the_gipsy on 1/26/24, 8:59 AM

    Two lines is wasteful, but it does look nice that the input is always full width.

    Another minimal prompt: https://lib.rs/crates/pista

  • by leo150 on 1/26/24, 7:13 AM

    The main reason I use fish shell is for the autocompletion feature it offers out of the box. If it had been an option back in the day, I would have tried something like starship
  • by rollcat on 1/26/24, 8:50 AM

    Since this is now a share your prompt thread, here's mine:

    https://github.com/rollcat/etc/tree/master/cmd/prompter

    It's quite portable (didn't test on Windows though); ~170 lines of Go; no dependencies outside of stdlib; calls no external commands; supports SSH, git, Docker, nix, and virtualenv; extremely simple to hack on.

  • by jwalton on 1/26/24, 6:15 AM

  • by jasonjmcghee on 1/26/24, 4:09 AM

    I find this to be a rather pleasant website, well done.
  • by daliusd on 1/26/24, 11:34 AM

    I am using starship for some time and it is great. The only advice is to avoid `custom` as it is slow: not too much but might be annoying.
  • by HackerThemAll on 1/26/24, 6:12 PM

    So now I need to install nerd font and this software on all clients' machines and VMs and whatnot. Asking IT departments for permission and waiting for compliance check.

    Or should I do it only on toy machines, risking different experience between them and production.

    No, thanks. Plain bash will suffice. Just like it did for so many years.

  • by KolenCh on 1/26/24, 9:55 PM

    I tried this couple of times and once a few days ago and wasn’t impressed. Coming from powerlevel10k it seems more limiting and not really faster. Has anyone think starship is better than powerlevel10k and how?

    Thanks.

  • by shmerl on 1/26/24, 7:07 AM

    Is there a Unicode symbol for source branch used there? Not really keen on using some specific fonts just for that.

    I usually use simple ^ but having something like there would be nicer.

  • by AtlasBarfed on 1/26/24, 12:50 AM

    Is this like a competitor for power10k type stuff and zsh?

    What makes this "infinitely customizable" aside from being turing complete?

    I don't see anything but ... a prompt.

  • by drivingmenuts on 1/26/24, 12:57 PM

    That capability already exists in Zsh, doesn’t it? Why would I need a third-party addon to do this thing?
  • by arun-mani-j on 1/26/24, 9:55 AM

    Starship users: how do you track updates? I manually update occasionally (mostly months)
  • by cranberryturkey on 1/26/24, 7:27 AM

    does this play well with omz?
  • by arrakeen on 1/26/24, 6:13 AM

    what kind of psychopath has a two line prompt?
  • by YuukiRey on 1/26/24, 5:53 AM

    It’s too bad this requires a Nerd font to be installed according to the landing page. I just don’t think that belongs in a terminal emulator and it should be optional