20

Is it possible to create alias for ConEmu? Also in linux, bash terminal have .bashrc file, what is similar to ConEmu?

Thanks

Maximus
  • 20,835

3 Answers3

23

New answer

In latest ConEmu builds there is an Environment settings page. You may set there environment variables and aliases for cmd.exe. One line set one alias. Example:

alias cdd=cd /d $1

Old answer

You may use doskey for creating aliases. Next example supposed your installation folder is C:\Program Files\ConEmu) and your shell is cmd.exe.

Create following batch file C:\Program Files\ConEmu\ConEmu\aliases.cmd:

@echo off
doskey /EXENAME=cmd.exe cdd=cd /d $1

Start your shell in ConEmu as followed (for example, Settings -> Startup -> Command line):

cmd /k "%ConEmuBaseDir%\aliases.cmd"

Now you may type in prompt something like this

cdd D:\AnyFolder
Maximus
  • 20,835
4

You could use TCC/LE with ConEmu. It's a free cmd.exe replacement and, unlike Powershell, is backward compatible. You can use the ALIAS command to create and manage aliases and TCSTART to do a similar thing .bashrc does.

Charles Roper
  • 10,879
1

For reference purpose...

Multiple arguments: $*

Source: Settings Environment

Diogo
  • 111
  • 2