须要注意的一点,Cmder来源于另一个项目ConEmu,所以不少的设置介绍都在这个项目下面。好比说task设置的语法html
在settings->Startup下面。添加一个task后,能够设置名称,名称按group分类。git
好比我设置两个任务,bash::pi,bash::test。github
在显示task时,这两个会放在一个task group里面(名字为bash),这个group里面有两个任务,一个叫pi,一个叫test。shell
这里通常就是设置iconbash
PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''" -new_console:d:"%USERPROFILE%"
app为powershell,参数为-ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''"
app
-new_console - cur_console
为cmder的指令(实际是ConEmu的),用来指定窗口的特征。能够指定目录,layout,
等等详细参考ConEmu的介绍。-new_console[:switches] or -cur_console[:switches] a - RunAs shell verb (as Admin on Vista+, user/pwd in Win2k and WinXP) b - create background tab c[0] - force enable [silent] ‘Press Enter or Esc to close console’ C:"<iconfile>" - specify icon used in tab d:"<dir>" - specify working directory f - force starting console active, useful when starting several consoles simultaneously h<height> - i.e., h0 - turn buffer off, h9999 - switch to 9999 lines i - don't inject ConEmuHk into starting process I - (GuiMacro only) forces inheriting of root process contents, like ‘Duplicate root’ feature m:/mnt - defines ‘/mnt’ prefix for Unix-path conversion n - disable ‘Press Enter or Esc to close console’ o - don't enable ‘Long console output’ when starting command from Far Manager p[N] - pty modes, N - bitmask: 1 - XTermKeys, 2 - BrPaste, 4 - AppCursorKeys; default is 5 (1+4) P:"<palettename>" - set fixed palette for tab r - run as restricted user R - force start hooks server in the parent process s[<SplitTab>T][<Percents>](H|V) - run new console in a split t:"<tabname>" - rename new created tab u - ConEmu choose user dialog u:"<user>:<pwd>" - specify user/pwd in args w - Enable ‘Overwrite’ mode in command prompt by default W:"<tabwallpaper>" - use specified wallpaper for the tab z - Don't use ‘Default terminal‘ feature for this command
最经常使用的就是生成新窗口,好比ssh
在当前窗口下面生成一个新的cmd窗口ui
cmd -new_console:sV
在当前窗口右边生成一个新的cmd窗口this
cmd -new_console:sH
使用xshell时,最方便的是记忆ssh地址,一键ssh。这里使用cmder加bash完成。rest
bash -new_console:i /mnt/e/pi/pi.sh
这条指令以后,便可执行pi.sh,这个sh里面只是简单的配置ssh。
bash -new_console:sVi /mnt/e/pi/pi.sh
bash -new_console:sVi:d /mnt/e/pi/pi.sh E:/pi
目前上述方法还有bug。若是采用上述方式ssh,会致使cmder没法记忆以前的命令,也就没法用上下方向键翻历史记录。
bash -new_console:sHh999d:E:\pi
这样就是开启了bash,并设置工做目录到想要的目录下面,而后ssh的话直接调用脚本便可。