Live data from Hacker News

Starship.rs: minimal, fast prompt for any shell

starship.rs

91–100 of 160 posts

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

#91
post #58

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.

It might not be a feature, but it is a selling point. It conveys that it was written relatively recently, is more likely to support modern features in the shell, runs reasonably fast and is reasonably portable.

If it was written in JS or python I'd already start worrying about what package manager to install it with in which environment, installing it globally is an anti pattern but symlinking it to .local/bin might complicate it.

So IMHO, the language something is written in is not just an implementation detail, it informs me in how well it will perform.

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

#92
post #62

Earlier quoted context omitted.

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

Who is "they"? Do you imagine all Rust devs as a hive mind?

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

#93
post #85

Earlier quoted context omitted.

I still think minimal is appropriate in this case as it shows only what’s relevant in the context.

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

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

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

#94

what kind of psychopath has a two line prompt?

In contrast to the minimalist philosophy, I want to have as much visual information about the active state of my session as possible. So many stories of deleted files and databases, botched git actions and server crashes due to admins/devs forgetting which folder/host they are on, or which user they are logged in as, or whether the previous command failed or not.

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

#95

Earlier quoted context omitted.

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.

> Git information is extremely useful to me.

I could see the case for that if it were accurate. But every implementation I’ve seen doesn’t give you accurate Git information. It gives you the status of the repo as it was when you last ran a command. If you are working on the repo in a separate editor window, then the Git information in your prompt is usually incorrect. Incorrect information is worse than no information. Besides which, your editor normally provides this information as you are working on it. Why does outdated Git information belong in a prompt when there are more convenient places to get the correct information?

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

#96
post #93

Earlier quoted context omitted.

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

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

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

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

#97

Earlier quoted context omitted.

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

Who is "they"? Do you imagine all Rust devs as a hive mind?

> for part of the rust community.

part is the important term here.

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

#98

Earlier quoted context omitted.

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.

>struggle using git on the command line and use git status nearly every other command

I think you are conflating two separate things.

I don't care for starship or prompts which show git status information. But, when interacting with git, I do often type git status.

That being said, I don't struggle with git.

Really, when I don't need status information, I don't want the horizontal space taken up with an unnecessarily noisy prompt.

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

#99
post #40

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

is red on error, no color on success (of the last command) also too much?

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

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

#100
post #88

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.

Starship 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

Post reply on HN