-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
git stash #365
Comments
@leoj3n I'm curious on your thoughts since you opened the original issue. |
Alternatively, is it possible to allow calling some custom function for displaying git information? Where I still want to use the rest of pure prompt, but insert my own git information. |
I'd love to see support for stashes... at the moment I've hacked something into If there are any stashes, the yellow ≡ icon is shown, otherwise not... (similar to how in and outgoing arrows behave) (I would be happy to prepare a PR for this.) PS: Icon and color is inspired by https://github.com/michaeldfallen/git-radar, which I recently migrated from to pure... |
Might be even nicer to have the icon the same color as the arrows, though I'm not a designer :) |
Here's the implementation: master...carhartl:git-stash-support It would need some polishing I guess, making the icon configurable (similar to the arrows) and so on. |
For what it's worth, in my version of git-aware-prompt I only show the stash indicator if the top stash was made on the current branch (or on the current commit). That suits my workflow, because it doesn't distract me when I am working on a different branch, but when I switch back to the branch where I originally stashed, the indicator appears, reminding me I need to pop. To reduce clutter, you may consider implementing the feature that way. Code is here but not beautiful! |
See #317 (comment) for a Q&D hack. |
Fixed by #462. |
I read the discussion in Issue #317 and understand the concern to not have a messy prompt. The right prompt suggestion is a decent workaround but the problem is that shows a message when there are no changes in stash. For a light user of stash, the constant 0 in the right hand side of the screen is a distraction. Changing that requires building a function that indicates it may be more appropriate.
I use stash to store work in progress changes that I don't want to commit before I re-integrate master into my branch. It's useful to see an indicator if there are changes in stash I forgot about if I get interrupted in my workflow. I used a custom prompt that someone at work shared around that used something like
*
to indicate there is something in your stash.Would it be a good compromise to add the stash indicator functionality but set a default minimum threshold before there is an indicator that could be changed with an environment variable? For example, the default could be a high number, say. Those who are light stash users could override that and set it to 0.
The alternative is to create a super light "pure-stash" indicator that is separate from pure.
The text was updated successfully, but these errors were encountered: