Is there any way to set a shortcut for frequently issued commands in Cmder?
Asked Answered
W

1

5

I use Cmder as my command prompt/console.

I find myself using the same commands many times a day. For example

git merge --no-ff my-long-branch-name

Is there any way I can store these commands in shortcut keys, like maybe, CTRL + G, instead of typing it each time?

Waylin answered 26/3, 2015 at 7:29 Comment(0)
T
9

Maybe it is a bit late, but still, here's the solution:

1) Open your Cmder folder and go to the config directory;

2) In \config\ open the file called aliases in any text editor;

3) Add this line at the end of the file:

my_alias_name=git merge --no-ff $*

4) Save the file and restart your Cmder;

5) Now you can type in your Cmder command line something like this:

my_alias_name my-long-branch-name

That's it :)

PS: Also, some information here can be useful for you.

Tallyman answered 7/6, 2015 at 11:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.