I am trying to make a `git` shortcut to commit with a message. Since aliases do not support parameters I came up with this function:

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

```

My expectation is to commit with a message without even typing quotes like this:

```
gcm create cli module

```

However I get an error, probably due to the string interpolation when expanding the all-params symbol. 

```
error: pathspec 'cli' did not match any file(s) known to git.
error: pathspec 'module' did not match any file(s) known to git.

```

How can I fix the function so I can have an alias that saves me from typing quotes?

**UPDATE:**

I love this shortcut so much that I must make a copy paste friendly version of the solution for everyone

```
alias gcm='function() { git commit -a -m "$*" }'

```