Cmder: create alias with multi word parameter

Created on 27 Jan 2015  ·  3Comments  ·  Source: cmderdev/cmder

I want something like that:

gc=git commit -m $1

But when i hit gc "my message", the commited message is just "my".

How can I add the entire string as one parameter?

Most helpful comment

You can use $* to get everything passed into the alias.
So gc=git commit -m $* would do what you need.

All 3 comments

You can use $* to get everything passed into the alias.
So gc=git commit -m $* would do what you need.

Thaaaaaanks very much! :)

Enviado pelo meu Windows Phone


From: Morten Lindhardtmailto:[email protected]
Sent: ‎27/‎01/‎2015 07:40
To: bliker/cmdermailto:[email protected]
Cc: Luís Rudgemailto:[email protected]
Subject: Re: [cmder] create alias with multi word parameter (#376)

You can use $* to get all the arguments.
So gc=git commit -m $* would do what you need.


Reply to this email directly or view it on GitHub:
https://github.com/bliker/cmder/issues/376#issuecomment-71616774

Good job man

Was this page helpful?
0 / 5 - 0 ratings