Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature/git_commit] Only show git commit hash in detached HEAD state #706

Closed
ybc37 opened this issue Dec 10, 2019 · 0 comments · Fixed by #738
Closed

[Feature/git_commit] Only show git commit hash in detached HEAD state #706

ybc37 opened this issue Dec 10, 2019 · 0 comments · Fixed by #738
Labels
✨ enhancement A new feature implementation.

Comments

@ybc37
Copy link
Contributor

ybc37 commented Dec 10, 2019

Feature Request

I recently switched to starship and really like it. Thanks!
The new git_commit module is very useful, but I have a feature request, which maybe also others may find useful (as other prompts do it like that).

Is your feature request related to a problem? Please describe.

In version 0.28.0 the git_commit module was added. I find the commit hash very useful when in detached HEAD state (no branch checked out, but a specific commit, e.g. while interactively rebasing,...). When I'm on a branch I don't need this information.

Describe the solution you'd like

IMHO an option to toggle the behavior would be great. E.g. detached_only:

  • false (default): behaves like right now; always shows the current commit hash.
  • true: only shows the commit hash when in detached HEAD state; not when on a branch.

Describe alternatives you've considered

Just live with it :)

@ybc37 ybc37 added the ✨ enhancement A new feature implementation. label Dec 10, 2019
ybc37 added a commit to ybc37/starship that referenced this issue Dec 15, 2019
ybc37 added a commit to ybc37/starship that referenced this issue Dec 15, 2019
ybc37 added a commit to ybc37/starship that referenced this issue Dec 16, 2019
ybc37 added a commit to ybc37/starship that referenced this issue Feb 6, 2020
ybc37 added a commit to ybc37/starship that referenced this issue Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement A new feature implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant