I have created a function in .zshrc
:
function gc {
git commit -m $1
}
but when I am trying to call this function:
gc "some commit message"
I get:
error: pathspec 'some commit message' did not match any file(s) known to git
what have I done wrong?
$1
. See https://unix.stackexchange.com/a/68748/ – Devon Aug 03 '20 at 08:06$1
is empty. – Gilles 'SO- stop being evil' Aug 03 '20 at 09:38$1
is empty). Are you sure you don't have a stale alias or a stale definition of the function? – Gilles 'SO- stop being evil' Aug 03 '20 at 09:39xtrace
option ((set -o xtrace; gc "some commit message")
) to better see what's going on. – Stéphane Chazelas Aug 03 '20 at 14:42