Skip to content

Instantly share code, notes, and snippets.

@rubiii
Created November 10, 2011 20:02
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 rubiii/1355998 to your computer and use it in GitHub Desktop.
Save rubiii/1355998 to your computer and use it in GitHub Desktop.

the problem:

gcm() { git commit -m "$@" }

which is supposed to be used like:

gcm fixed issue 113

and should execute:

git commit -m "fixed issue 113"

in double quotes so i can use single quotes

inside the message! like:

gcm what's this s***?

HELP!

@rubiii
Copy link
Author

rubiii commented Nov 10, 2011

kinda evil, but this seems to work:

gcm() {
  eval "git commit -m \"$@\""
}

single quotes need to be escaped though:

$ gcm who\'s responsible for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment