Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 897
CodyBugstein Avatar asked Mar 26 '15 07:03

CodyBugstein


1 Answers

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.

like image 85
Denis Yakovenko Avatar answered Oct 09 '22 16:10

Denis Yakovenko