Top
Best
New

Posted by benoitg 7 days ago

Starship: A minimal, fast, and customizable prompt for any shell(starship.rs)
464 points | 211 commentspage 3
usmanity 7 days ago|
I started using Pure prompt since I'm only ever using zsh and it seemed to cut down a lot on the setup required, I do have to spend like 15-20 mins on a new computer to get everything working as expected but once it gets going, it feels like the best mix of customization and speed.
exiguus 7 days ago||
I have several use-cases / problems I solve with my prompt:

- See current git branch (to not mistakenly work or commit into the wrong branch)

- See git has changes (to stash them before switching branches)

- See the current language/engine version (like go v1.24.2, because i use tools like gvm, sdk, nvm or rustup to switch version in projects and i want feedback that i have the correct/expected language version enabled)

- See that i am on my local or a remote machine and k8s context

That's mostly it. Of course, I can do this by writing my own prompt, but I found out that Starship does this for me, basically out of the box, on any machine and terminal, in a very nice-looking way. Also, I am not a fan of fancy-looking prompts, so visually, Starship fits best for me.

oweiler 7 days ago||
I use Starship without any customizations and its good enough for my every day use.
bbkane 7 days ago||
I ended up writing my own zsh prompt a few years ago and it's worked like a charm for my simple needs: https://github.com/bbkane/dotfiles/blob/master/zsh/dot-zshrc...

ends up looking like this: https://github.com/bbkane/dotfiles/blob/master/zsh/README_im...

hu3 7 days ago||
I'm a long time user of https://github.com/ohmybash/oh-my-bash

It would be nice to have a comparison and reasons to change from popular tools.

nodesocket 7 days ago|
Came here to ask the same. Long time ohmyzsh user, and wondering what new features / benefits Starship has.
lknuth 7 days ago|||
I found the config a lot nicer. It was very easy to custimze to my (very minimal) liking. The config is easily readable. And its portable to any supported shell.

Most shells can probably do everything this can as well and if you're already familiar with the archaic syntax there is probably limited use for you.

For an idea, here is my current config https://github.com/LukasKnuth/dotfiles/blob/main/zsh/.config...

pasc1878 7 days ago|||
Basically it is quicker.

I also expect it has everything that you have in your prompt so is a direct replacement without losing anything.

hu3 7 days ago||
I don't doubt that it can be quicker but:

1) I don't recall having a problem with prompt speed.

2) Are there any benchmarks?

baruchel 7 days ago||
Can't find the URL again for a funny (and probably universal) custom prompt: you had to do some

    curl <url> | 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.

perplex 7 days ago||
Happy user of spaceship prompt for zsh: https://spaceship-prompt.sh, and, among other things, it runs repo status asynchronously.
dannyfritz07 6 days ago||
If you want to use Starship, but disable nerdfont and the language features leaving things like git, duration, error, etc., use this config: https://github.com/dannyfritz/dotfiles/blob/e53d410364bf6e2f...
Henchman21 7 days ago||
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?
jethro_tell 7 days ago||
I do know that though that assumes some things about os and shell.

Run a full screen term on my machine for a good chunk of my workflow and I just like to have time and battery in my term. I render it as ‘(15:35) [80} <hostname> $ ‘ and for boxes without batteries it’s just ‘(15:35) <hostname> $ ‘

Some times I’ll go back through my scroll back and look at the time when I’m trying to figure things out. Or when I run a command that generates a ton of output, I’ll note the time and run the command then later search back to the time in scroll back to start at the top of the log.

None of these are features I truly miss on a vanilla box, I can look at a clock or watch and will put a comment into the scroll back to find later.

Henchman21 7 days ago||
I think we’re quite similar I just put my time display in the tmux status bar :)

Just so I am clear, use your prompts as you see fit — I’m just trying to understand how others work. Thanks!

hiAndrewQuinn 7 days ago|||
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 I rarely think to look there when the detail might be pertinent. C'est la vie.

Henchman21 7 days ago||
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 :)
d332 7 days ago||
It's a different use case. If you run a slow command and check terminal later, you can see how long it took.
bodge5000 7 days ago|
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)
JimDabell 7 days ago|
/etc/zsh:

https://pastebin.com/kjwQ97z1

/etc/zshrc_Apple_Terminal:

https://pastebin.com/kfKF5ych

bodge5000 6 days ago||
Fantastic, had no idea about these, cheers!
More comments...