Live data from Hacker News

Starship.rs: minimal, fast prompt for any shell

starship.rs

31–40 of 160 posts

Re: Starship.rs: minimal, fast prompt for any shell

#31
post #29

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

Just FYI, Starship will only create your prompt; it won't alter the autocompletion behavior of your shell.

Re: Starship.rs: minimal, fast prompt for any shell

#34

what kind of psychopath has a two line prompt?

I can see arguments for both sides.

Personally, I find the extra blank line to be a useful visual separator between lines of output. Particularly useful when running commands with lots of output or 'cat'-ing files or logs.

Re: Starship.rs: minimal, fast prompt for any shell

#35

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

It works fine out of the box on mac and windows, have not tried it on linux yet (only over ssh).

Re: Starship.rs: minimal, fast prompt for any shell

#36
post #32

The "minimal" part is a little funny. Historical minimal shell prompts: $ # % >

I think a huge amount of these prompts are just fiddling with things because people think they are clever, not because they are actually useful.

My prompt for years has been:

    : ▶
I add the hostname if it’s an SSH session and change ▶ to # if I’m root because those are both important contexts that should be omnipresent, but aside from that, I haven’t felt like I’m missing anything at all. The CWD is in the window / tab title bar, but I never need to look at it because the CWD is always so closely tied to what I am doing in the shell that it’s always top of mind.

Re: Starship.rs: minimal, fast prompt for any shell

#37
post #32

The "minimal" part is a little funny. Historical minimal shell prompts: $ # % >

I think a huge amount of these prompts are just fiddling with things because people think they are clever, not because they are actually useful. My prompt for years has been: : ▶ I add the hostname if it’s an SSH session and change ▶ to # if I’m root because those are both important contexts that should be omnipresent, but aside from that, I haven’t felt like I’m missing anything at all. The CWD is in the window / ta…

Git information is extremely useful to me. I notice colleagues who don't have that tend to struggle using git on the command line and use git status nearly every other command (much as I tend to do when I'm remoting into a shell with a plain prompt).

Python venvs are useful too if you have a shell for running the program and other shells that just happen to be within that directory.

Re: Starship.rs: minimal, fast prompt for any shell

#38
post #32

The "minimal" part is a little funny. Historical minimal shell prompts: $ # % >

I think a huge amount of these prompts are just fiddling with things because people think they are clever, not because they are actually useful. My prompt for years has been: : ▶ I add the hostname if it’s an SSH session and change ▶ to # if I’m root because those are both important contexts that should be omnipresent, but aside from that, I haven’t felt like I’m missing anything at all. The CWD is in the window / ta…

I have a tiny prompt I wrote that adds two important bits: git branch w/ status (if in a git repo) and venv (if any).

So it looks like:

    me@pop-os  09:19:20  files: 49
    ~> /path/to/cwd
    $
by default and in a git repo:

    me@pop-os  09:20:14  files: 18
    ~> ~/dev/work/projects/someproject
    [ git ~ feature/some-feature || Add: 0 Mod: 1 Del: 0 Unt: 0 ]
    $
in a venv:

    me@pop-os  09:20:14  files: 18  (venv: my-venv)
    ~> ~/dev/work/projects/someproject
    [ git ~ feature/some-feature || Add: 0 Mod: 1 Del: 0 Unt: 0 ]
    $

Note, these all use different font colors to be distinguishing.

Re: Starship.rs: minimal, fast prompt for any shell

#39
post #3

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.

Yes! This is why I pair the two up in https://github.com/hiAndrewQuinn/shell-bling-ubuntu.

These context clues are especially important for newcomers to the command line. A CLI newbie who sticks with it might eventually progress to the point where they decide to ditch Starship, or to ditch fish, or to ditch both, but until they get to that point, the solid defaults and OOTB features of these two have a lot going for them. Meanwhile sticking someone in a '$ ' with no coloring, no autocompletion, and no real clues in the terminal itself is more likely to lead to them just giving up entirely.

Post reply on HN