Skip to content

Instantly share code, notes, and snippets.

@kevinushey
Created January 29, 2014 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinushey/8694346 to your computer and use it in GitHub Desktop.
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
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