10 ms·
Starship.rs: minimal, fast prompt for any shell
- YuukiRey 3y agoIt’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
- deleted 3y ago[deleted]
- dabber 3y agoThe homepage is somewhat misleading, you can use it without Nerd Fonts and there's actually a preset config listed for it mentioned on the Presets page [0] with the note: > This preset will become the default preset in a future release of starship It also links to an open issue on the GH repo about it [1] (although that issue is 2 years old and doesn't seem to be top priority.) [0]: https://starship.rs/presets/#nerd-font-symbols https://starship.rs/presets/#nerd-font-symbols [2]: https://github.com/starship/starship/pull/3544 https://github.com/starship/starship/pull/3544
- fodkodrasz 3y agoIt works fine out of the box on mac and windows, have not tried it on linux yet (only over ssh).
- tracker1 3y agoMany code fonts have the bat majority of the symbols already. The new MS Terminal for Windows uses Cascadia, and IIRC only missing the node logo IIRC. Other fonts work to. I use Fira Code myself.
- daliusd 3y agoI 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.
- matchai 3y agoStarship maintainer here. `custom` spawns a child process of your shell, so it's probably being slowed down by a slow shell init script. If the custom script you're running doesn't require your full shell customization to work, you can provide a custom shell command [0], passing an argument to not use your shell config. For instance: `fish --no-config` or `bash --noprofile --norc` [0]: https://starship.rs/config/#custom-command-shell https://starship.rs/config/#custom-command-shell
- daliusd 3y agoThanks. That might help.
- AtlasBarfed 3y agoIs 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.
- retrochameleon 3y agoMaybe read through the documentation and try it out. It has very robust configuration options, many pre-built modules that are ready to include in your prompt, for example, one that prints git info for the current location if it's a repository. So yes, it is kind of a competitor to p10k, but not zsh. It's just the prompt, and it just focuses on being a very good prompt tool.
- imp0cat 3y agoYeah, it's just a prompt replacement that does all the things that your prompt already does, but it's written in Rust.
- emi2k01 3y ago"it's just..." is kinda demeaning. People want something easy to use with good defaults. If that wasn't the case, shells wouldn't have a hundreds of plugins dedicated to customizing the prompt.
- mort96 3y agoHave you tried writing a PS1 which shows all the info that's demonstrated on the linked page? I have. It's a decent chunk of work. It's a whole lot more work to do it well. Did you remember to handle the situation where the git repo is so gigantic that running `git status` takes half a minute? Or the case where there is a .git folder somewhere but permissions are wrong or it crosses a mount barrier so `git status` prints a page of text to stderr? Does the way you're finding the current branch handle the case where HEAD doesn't point to a branch? The only way your prompt "already does" this stuff is if you've spent a whole lot of time configuring it and tuning it, or if you're already using something like oh-my-zsh. And if you're already using something like oh-my-zsh, well, starship is just a competitor to (the prompt portion of) that.
- rgoulter 3y agoStarship's an excellent prompt replacement. I think it goes well with the fish shell: it's much nicer than the default, without requiring customisation.
- dietr1ch 3y agoMaybe it can turn into the default prompt as a library dependency after the Rust rewrite, but the rust rewrite needs to rollout before thinking too far ahead.
- hiAndrewQuinn 3y agoYes! This is why I pair the two up in https://github.com/hiAndrewQuinn/shell-bling-ubuntu 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.
- Narushia 3y agoSwitching to Starship was actually what inspired me to also switch from Bash to Fish. Purely because of the transient prompt feature, which is not supported for Bash. With the transient prompt, you can have things like Git or Kubernetes status on your “main prompt”, but without always printing them in the terminal for the commands you ran previously. It keeps the history much cleaner, and therefore more pleasant to scroll back up. I've also configured it to print the time when the commands were executed to the start of the lines.
- wodenokoto 3y agoI’m not sure I understand. Do you have a screenshot shot of something with and without transient prompt that shows the difference?
- myaccountonhn 3y agoI’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
- eviks 3y agois red on error, no color on success (of the last command) also too much?
- myaccountonhn 3y agoA little bit, as I find that it can make me lose my trail of thought. Red errors for LSP or because something is wrong in the executed command is great though.
- lazypenguin 3y agoFair enough but the usefulness of a tool like this is not the colors it's the additional context at the prompt
- retrochameleon 3y agoWhen everything is one big screen full of white text, I find it very difficult to visually parse out, separate, and focus on information. Colors help guide your eyes and provide context. They can certainly be overused, however.
- illusive4080 3y ago[flagged]
- konart 3y agoWell, in most casees you can configure it and back in all black and white\green if you want to. Having 8 (or more) colors help when dealing with information though, at least when you need to get a quick result and not just dig into the man pages.
- 3y ago
- lazypenguin 3y agoI 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.
- tecoholic 3y agoInstalled it yesterday and it threw my email and AWS default region on to the prompt. Pretty bad defaults. Promptly removed it.
- notnmeyer 3y agoit’s trivial to configure fwiw. with as much info as it is capable of showing it’s a stretch to think it’ll magically know what you want.
- tecoholic 3y agoMy problem is not that it didn’t do what I want, just that it seems to work in a “opt in to everything by default” which was overwhelming. I prefer things that without config don’t do anything or do the bare minimum and then lets me slowly add to it.
- kuschkufan 3y agoThank you for your opinion.
- gkfasdfasdf 3y agoI had a similar reaction to the out of the box config. However after spending a little bit of time with the doc, I turned off all the useless stuff like my docker version and but left stuff like git branch, status, exit code, etc.
- jasonjmcghee 3y agoI find this to be a rather pleasant website, well done.
- jwalton 3y agoSee also https://kitschprompt.com/docs/intro https://kitschprompt.com/docs/intro
- arrakeen 3y agowhat kind of psychopath has a two line prompt?
- konart 3y agoI do. I'd like to have some usefull information about my session but also prefer when my input begins from the first column.
- Hamuko 3y agoI also can't understand the two-line prompt. I want my prompt to take as little space as possible.
- tracker1 3y agoI appreciate the extra context information. Displaying the user/system over ssh is pretty nice. I've also done similar in windows for network drives.
- pasc1878 3y agoI agree with the latter point. But I use xonsh as the shell and that has a prompt which can go on the last line of the terminal and does not get repeated each time, so when you scroll back you don't all the information each time. I use that for starship information and the prompt is just the return code p[lus a character.
- BiteCode_dev 3y ago
- juxtapose 3y agoI'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.
- Twirrim 3y agoI've tried a number of different shell prompt tools over the past few decades. I've disliked them all due to their latency. I don't want to "feel" the delay. They were all in scripting languages, be it native bash, or python or whatever. I tried out starship about three years ago and it is so fast I don't notice its execution time at all. I switched and haven't looked back.
- shmerl 3y agoIs 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.
- leo150 3y agoThe 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
- shakow 3y agoJust FYI, Starship will only create your prompt; it won't alter the autocompletion behavior of your shell.
- cranberryturkey 3y agodoes this play well with omz?
- ludovicianul 3y agoYes. I use it for years. No problems.
- neilv 3y agoThe "minimal" part is a little funny. Historical minimal shell prompts: $ # % >
- JimDabell 3y agoI 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.
- adhesive_wombat 3y agoGit 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.
- tracker1 3y agoLargely of the same mind. I've found starship very useful and have been using it everywhere I can fit a few years now.
- the_gipsy 3y agoIt's probably a bell curve and you're only seeing the left side.
- mort96 3y agoHuh? What here is a bell curve? What would be on the "right side" of the bell curve that invalidates the idea that git info in PS1 is useful?
- rollcat 3y agoSince this is now a share your prompt thread, here's mine: https://github.com/rollcat/etc/tree/master/cmd/prompter 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.
- skrebbel 3y agopoints for the FAQ
- the_gipsy 3y agoTwo lines is wasteful, but it does look nice that the input is always full width. Another minimal prompt: https://lib.rs/crates/pista https://lib.rs/crates/pista
- srid 3y agoIf you use home-manager, installing starship is as simple as adding `programs.starship.enable = true;`. https://github.com/srid/nixos-config/blob/master/home/starship.nix 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 https://nixos.asia/en/direnv
- arun-mani-j 3y agoStarship users: how do you track updates? I manually update occasionally (mostly months)
- microflash 3y agoI use scoop on PC and homebrew on Mac. I run their update scripts weekly to pull the latest versions.
- Narushia 3y agoI just have release notifications enabled on their GitHub, and then update manually when I feel like it.
- theshrike79 3y agoI installed it via Brew and it just automatically updates. Need to check on how to handle it on shells with no root access.
- PurpleRamen 3y agoI have a bookmark-folder of release-sites and changelogs I visit ever some months. Though, they are on github, which has a Newsfeed, so at some point I switch to a feedreader or mail-forwarder to have this more under control. But I'm still searching for something good.
- weebull 3y agoAm 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>
- eviks 3y ago<cue at least one complaint of this kind under almost any Rust-related project>
- usrbinbash 3y agoThe fact that this happens should be food for thought for part of the rust community. Because the way I see it, if they keep this up, a few years from now, they could, other than some obscure linux kernel modules almost noone uses and a good grep-alternative, be well along what I lovingly call the "Haskell Route".
- sebzim4500 3y agoWhat exactly should the takeaway be? Stop making things in Rust because people on HN will complain?
- imp0cat 3y agoNo, don't stop. But it's an interesting observation, don't you think? Why is it that just by adding "... in Rust" you can almost guarantee that people will roll their eyes and think "oh, not another one". Other languages do not carry such stigma, why does Rust have such reputation?
- sebzim4500 3y agoI don't know, but it certainly says more about the people rolling their eyes than it does about the people actually building things.
- 3y ago
- Narushia 3y agoMy interactive shell experience has substantially improved after installing Starship. :) The other thing was changing from Bash to Fish.
- blooalien 3y agoSame. The two work so well together. Been happy with both Fish and Starship for a long(ish) while now.
- 3PS 3y agoChiming in as another fish+starship user. It's hard to imagine using anything else now; I get just about every feature I would ever want out of my shell with essentially zero configuration, which makes it easy to replicate my setup across a ton of heterogeneous devices and operating systems.
- FeloniousHam 3y agoMe too :). I do wish fish could seamlessly convert and run bash script on the fly..
- 3PS 3y ago> I do wish fish could seamlessly convert and run bash scripts on the fly.. It can. With a little help. I use this: https://github.com/edc/bass https://github.com/edc/bass
- Night_Thastus 3y agoI love Fish, but I cannot for the life of me to get Starship working well. Trying to get it working on WSL (Ubuntu 20.04 and Centos) as well as MSYS just wasn't happening. On the few occasions I did get it working, it was unbearably slow. Simple commands would have sometimes half a second of delay. I could time what was causing the slowdown and disable some of it, but by the time I got it bearable I had disabled basically all of Starship. Then there were font-related issues on top. Ugh. I hope others have a better experience than I.
- joshstrange 3y agoI 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?
- wodenokoto 3y agoI suppose I “just don’t use other machines” and when I do, they suck and mine rocks, which I consider a lot better than “both sucks, but I am used to it”
- joshstrange 3y agoTotally understandable. I my computer is highly configured for “me” which means I feel lost if I sit down at someone else’s computer. That said, I spend 90%+ of my time in a terminal SSH’d to other box. If it was closer to 50-50 I’d be more interested but improving <10% and the added context switch isn’t worth it for me personally. Thank you!
- rgoulter 3y agoIf it's a machine that you're going to be working on a lot, you might as well have good tools installed. (And if it's a machine where stuff like starship would be bloat, then it's probably not something people should be SSHing into frequently).
- KolenCh 3y agoIf you want to, you can invest time in automating this so that you can feel at home at every boxes. Surely it is some work to ensure your user environment are all the same across different machines. But it is also liberating as you are no longer limited to choose the few common features available everywhere.
- usrbinbash 3y ago> "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.
- daliusd 3y agoI still think minimal is appropriate in this case as it shows only what’s relevant in the context.
- INTPenis 3y agoYou're missing the point. It runs every time you show the prompt. Anything that does that is not minimal and it increases the risk of failure. Some things that you use regularly should be kept as minimal and as stable as possible. To me that includes the shell prompt, editor, browser for example.
- daliusd 3y agoI am cli/vim guy - that’s my daily tools. Starship is very stable and it is useful for me. The only problem I have experienced is with custom extension I wrote myself (problem was slowness not stability).
- usrbinbash 3y agoThat's all well and good, but has nothing to do with my argument. If you need to invoke a program for every prompt, when the alternative is to just let the shell do it's thing, it's no longer "minimal", period.
- daliusd 3y agoWell, we are arguing about semantics. You say that minimal means that it must be functionally minimal. I say that minimal UX is valid meaning as well.
- drivingmenuts 3y agoThat capability already exists in Zsh, doesn’t it? Why would I need a third-party addon to do this thing?
- PurpleRamen 3y agoIt's simpler to configure and extend, and also more likely gets support for more exotic information-sources. It's a dedicated tool for this specific job, so following the "Unix-philosophy". And probably more optimized for edge cases like big git-repos and stuff. And you can easily switch shells.
- bbqbbqbbq 3y ago[dead]
- HackerThemAll 3y agoSo 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.
- microflash 3y agoStarship works pretty well without nerdfonts, BTW.
- KolenCh 3y agoYou can install it very easily without permission (unless I misunderstood the permission part is not technical but political.)
- KolenCh 3y agoI 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.