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

Really missing the @modified type functionality mentioned in the README #93

Open
rocketraman opened this issue Sep 19, 2018 · 2 comments

Comments

@rocketraman
Copy link

What a great project. Super-useful. However, I'm really wishing the @modified functionality mentioned in the README was available -- one almost always wants to do stuff in just projects with changes. I see that there has really been no activity on this project for a while, but do you have any plans to keep improving this project?

@rocketraman
Copy link
Author

For now, I'm working around this with a hack. I created a script called ifgitmodified with this content:

#!/bin/bash                                                                                                                                                                                                                        
if [[ $(git status --porcelain) ]]; then                                                                                                                                                                                           
  $@                                                                                                                                                                                                                               
fi

and now I can do:

gr @whatever ifgitmodified <any command and args here>

I also have similar scripts ifgitahead, ifgitbehind, and ifgitbranch.

@rocketraman
Copy link
Author

All these scripts uploaded to https://github.com/rocketraman/grscripts in case anyone else finds them useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant