Created
January 29, 2014 18:49
-
-
Save kevinushey/8694346 to your computer and use it in GitHub Desktop.
A clever use of R's print mechanism for getting the git status for the current directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_status <- '' | |
class(git_status) <- "__git_status__" | |
print.__git_status__ <- function(x, ...) system("git status") | |
git_status ## prints 'git status' for the current dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment