須要注意的一點,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的話直接調用腳本便可。