top | item 39139954

(no title)

adhesive_wombat | 2 years ago

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.

discuss

order

Arch-TK|2 years ago

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

tracker1|2 years ago

Largely of the same mind. I've found starship very useful and have been using it everywhere I can fit a few years now.

JimDabell|2 years ago

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

adhesive_wombat|2 years ago

I can honestly say that has never once been a problem I have had, and I've had git information in the prompt for over 10 years.

Also how is "enter" less convenient than literally any other command that you'd still have to type and run to get up-to-date information in a command line?

the_gipsy|2 years ago

It's probably a bell curve and you're only seeing the left side.

mort96|2 years ago

Huh? 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?

happymellon|2 years ago

Yes, having the git project displayed is useful.

To a lesser extent, I've done a few Java version migrations so it can be useful for the Java version to be printed so it's obvious if I've got the wrong JDK enabled. Python fell under this, but I don't think I'll have to worry about having one project be Python 2 while the others are 3 anymore.