Live data from Hacker News

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

starship.rs

131–140 of 216 posts

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

#131
post #64
post #58

Earlier quoted context omitted.

I literally use just PS1='$ '. `git status` to know git stuff. `pwd` for the current working directory, etc I also don't use aliases like `gs` or `..` One good thing about having a very minimal setup is that you feel at home anywhere. It wasn't always like this. I used many, many prompts and shell tools over the decades. The only tool that stood the test of time is tmux.

Same here, I also find that aliases for speed introduce unnecessary complexity and mental overhead later on. It's not much, and for other people it doesn't matter or they have a different preference, but that's what I prefer. Sort of contrary to that I really enjoy the maximalist shells. A computer should be fun to use!

I don't use aliases, but abbreviations that expand to the actual full command. Helpful to type less and history has the exact.

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

#132
post #25

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.

Came here to ask the same. Long time ohmyzsh user, and wondering what new features / benefits Starship has.

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

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

#133

Earlier quoted context omitted.

For personal workstation, the current directory is enough. Maybe I change the color based the status of the last command. That’s pretty much the only information I need before entering any command. Everything else can be accessed when I really need it.

You don't need to know what branch you're on before running commands? I cant tell you the number of times ive been on the wrong branch executing stuff.

Manual git status is enough for me.

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

#134
post #72

Earlier quoted context omitted.

I'm highly aware of which branch I'm on. Because it's because I don't use any scripts or automation that switches branches; I only ever switch branches manually so I have that awareness.

How well does this work when you work on multiple repos with longer pauses inbetween? And the Branch is also an unintrusive reminder that you are in a path under versioncontrol.

not op, but if I haven’t been in a working directory for a while, I always run `git status` anyway. Then I know the branch and any out of date files. I usually run `git pull —-rebase` and get everything back up to date. I try not to leave broken branches around, so It’s rare that knowing which branch I’m on is an issue.

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

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

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

#136
post #72

Earlier quoted context omitted.

I'm highly aware of which branch I'm on. Because it's because I don't use any scripts or automation that switches branches; I only ever switch branches manually so I have that awareness.

I only switch branches manually too, but I work in many repos and come back to stuff after days sometimes.

Even if I know my current branch, having my prompt show me untracked/uncommitted/unpushed changes helps to identify if something didn’t work because I’m in a dirty state, or if something I ran (unexpectedly) caused a dirty state.

For example, I don’t expect running scripts/build.sh to modify tracked files in the repo. Seeing part of the prompt go from “” to “?2!3” (two untracked, three changed files) makes that glaringly obvious.

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

#137

Earlier quoted context omitted.

My experience of Starship on Windows has been great. I'm using the Windows native builds of both Starship and git (both installed/updated via winget these days) in PowerShell. I try to avoid emulation layers like MSYS2, as much as I'm able. Also, yes, if git hangs on git show/git diff that sounds like an antivirus problem or a dying hard drive or the first one causing the other one.

Or just a really big git repo. Starship includes a timings command, on linux (with an annoying antivirus meddling) this is what I see against one directory: git_status - 6ms - "[!?] " directory - 4ms - " " python - 3ms - "via v3.12.9 (.venv) " character - in " If I go in to my checked out version of the linux kernel, probably the biggest git project I've got kicking around: git_status - 115ms - "" directory - 4ms - "…

I appreciate Starship also has configurable limits on those timings, too. I've almost never seen Starship hang for very long, as it will just drop the thing that is slow. I sometimes but rarely (usually just starting a new shell, but sometimes if compiling in another window/terminal) see the "[WARN] Executing command git timed out" error and the git_status won't display until the next prompt and that is usually fine.

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

#138

Earlier quoted context omitted.

Why the timestamps are that important? Honestly asking. You can always time your commands with "time".

When you’re debugging, especially a complex system, especially during an outage or postmortem, understanding when your commands executed relative to when your log lines appeared is really helpful.

That's a good reason to have timestamps in the history, which you should.

Something like

  export HISTFILESIZE=
  export HISTSIZE=
  export HISTTIMEFORMAT="[%F %T] "
  shopt -s histappend
really ought to be default in bash.

It's not as clear why you need it in the interactive prompt.

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

#139
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 think we can generalize this into the overall computing environment. When I was younger, I was that kid building my whole OS from source via Gentoo, with all the CPU-specific flags and optimizations. I had a very detailed window manager configuration (fwvm2 maybe?), a .bashrc full of aliases and functions for every occasion. And yes, a custom prompt. I think these kinds of over-optimization rabbit holes are a good…

I still have free time, my shift to default config and stable software was caused by how many workfkow changes for no reason I could stomach. I rarely need the latest features. Getting things to work and expecting to stay working for a while is the basic premise of computing.
Post reply on HN