-
Notifications
You must be signed in to change notification settings - Fork 2k
Cmder's shell in other terminals
You can start Cmder's shell in other terminals.
-
Make sure that the
cmder_shell.cmd
file exists in the following path:[cmder_root]\vendor\bin\cmder_shell.cmd
If you don't see this file, update Cmder to the latest version.
-
Create a file named
cs.cmd
(or anything else) to call the Cmder shell in this path:
[cmder_root]\cs.cmd
Tip: You can savecs.cmd
in any other directory that is also present in the%PATH%
environment variable.The content should be:
@"%~dp0\vendor\bin\cmder_shell.cmd" %*
Or, if you put
cs.cmd
in any other place beside Cmder's root directory (i.e.[cmder_root]
):@"%cmder_root%\vendor\bin\cmder_shell.cmd" %*
This is so when you type
cs
in any Command Prompt window, the Cmder's clink shell is launched.
Alternatively, you can forgo this step, and call thecmder_shell.cmd
directly from its path. -
Important Add Cmder's installation path to
%PATH%
:
https://github.com/cmderdev/cmder/wiki/Setting-up-Environment-Variables#3-adding-to-path -
Type
cs
from Cmd.exe to get the Cmder's shell:
(If you chose another name in step 2, enter that instead ofcs
) -
Optional Install OneHalfDark color scheme:
- Install Microsoft's
ColorTool.exe
from here - Download OneHalfDark.itermcolors
- Read this guide to apply the color scheme, for example:
colortool -b OneHalfDark
- Install Microsoft's
-
Optional Install the agave, or your custom monospace font, and set it as the default font for Cmd.exe
Demo:
Now, whenever you type cs
in any shell, you'll get the Cmder's clink shell.
This works also when you're in remote shells, e.g. if you ssh
to your machine, you can type cs
in there to get Cmder's clink shell.
If you add cmder_shell.bat
to the AutoRun
registry key, the Cmder shell will start in CMD.EXE
each time you open a new cmd window.
- Open
RegEdit.exe
and navigate to the following key (Create the Key if it doesn't exist):- For Current User Only:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
- For All users on the PC:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
- For Current User Only:
- Either Edit or Create a new key to create a String (
REG_SZ
) and enter the name asAutoRun
, then enter the following as Data:
cmder_shell.bat
- Assuming that you have followed the
%PATH%
instructions correctly, every time you open theCMD.EXE
, you'll have the Cmder shell in your terminal.
⚠ Word of caution (originally from https://github.com/cmderdev/cmder/issues/2650#issuecomment-1016459184)
Setting up AutoRun like that will slow down every CMD invocation (even the many background ones that don't show any window), and can potentially interfere with OS or app internal invocations of CMD that aren't expecting Cmder to do so much work. The script could also potentially cause things like installing OS updates to malfunction.
Something to keep it in mind in case you ever notice strange glitches in the future (or various operations being slower than normal) -- removing the script from AutoRun can be a good troubleshooting step whenever strange things are afoot on the computer.
Here's the full registry tweaks. You can save this in a 📁 Console.reg
file using your text editor (e.g. Notepad), then double click it to install.
Modify it to your needs before installations.
- Documentation: https://docs.microsoft.com/en-us/windows-server/administration/windows-console-changes
- Blog Post: https://devblogs.microsoft.com/commandline/understanding-windows-console-host-settings/
- Reference:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ForceV2"=dword:00000001 ; 1 to enable the new improved console features
"CtrlKeyShortcutsDisabled"=dword:00000000 ; 0 to enable new key shortcuts
"VirtualTerminalLevel"=dword:00000001 ; 1 to enable VT100 colors
"FilterOnPaste"=dword:00000001 ; 1 to enable new paste behavior (replace some special characters such as “smart quotes”)
"QuickEdit"=dword:00000001 ; 1 to enable selection of text via mouse for copy and paste
"InsertMode"=dword:00000001 ; 1 to enable Insert mode, 0 for Overtype mode
"LineSelection"=dword:00000001 ; 1 to enable wrapped text selection
"LineWrap"=dword:00000001 ; 1 to have the Windows Console Host break long lines into multiple rows
"CursorSize"=dword:00000019 ; cursor height as a percentage of a single character
"ExtendedEditKey"=dword:00000000 ; 1 to allow the use of extended edit keys
"ExtendedEditKeyCustom"=dword:00000000
"EnableColorSelection"=dword:00000000 ; 1 to allow selection colorization
"HistoryBufferSize"=dword:00000032 ; number of commands to store in the command history buffer
"HistoryNoDup"=dword:00000001 ; 1 to prevent duplicate entries in the history
"NumberOfHistoryBuffers"=dword:00000004 ; number of history buffers
"ScrollScale"=dword:00000001 ; number of lines to scroll when holding the shift key
"TerminalScrolling"=dword:00000000 ; 1 to enable terminal scrolling
"CurrentPage"=dword:00000000 ; current page number
"LoadConIme"=dword:00000000 ; only used for asian script input locales
"TrimLeadingZeros"=dword:00000000 ; remove zeroes from the beginning of a selected string on copy (e.g. `00000001` becomes `1`)
"WordDelimiters"="`;:,.[]{}()/\\|^&*-=+" ; characters that delimit words. by default, only the space character is used when selecting text word-by-word with CTRL+SHIFT+ARROW keys.
"ScreenBufferSize"=dword:012c0050 ; 0x012c = 300 rows, 0x0050 = 80 columns
; Terminal window options
"WindowAlpha"=dword:000000fc ; window opacity (0x4d = 30% to 0xff = 100%)
"WindowSize"=dword:00190050 ; terminal columns and rows (0x0019 = 25 rows, 0x0050 = 80 cols)
"FullScreen"=dword:00000000 ; 1 to enable full screen window
; Font preferences
"FaceName"="Consolas"
"FontFamily"=dword:00000036 ; enable TrueType font
"FontWeight"=dword:00000190 ; font weight
"FontSize"=dword:00100000 ; font size
; Color preferences
"CursorColor"=dword:ffffffff ; cursor color
"DefaultBackground"=dword:ffffffff ; default background color
"DefaultForeground"=dword:ffffffff ; default foreground color
"PopupColors"=dword:000000f5 ; popup colors (press F2 to activate)
"ScreenColors"=dword:00000007 ; screen colors
; OneHalf dark color scheme
"ColorTable00"=dword:00332c27
"ColorTable01"=dword:00efaf61
"ColorTable02"=dword:0079c398
"ColorTable03"=dword:00c1b556
"ColorTable04"=dword:00756cdf
"ColorTable05"=dword:00dd77c5
"ColorTable06"=dword:007ac0e4
"ColorTable07"=dword:00e4dfdb
"ColorTable08"=dword:0074635a
"ColorTable09"=dword:00efaf61
"ColorTable10"=dword:0079c398
"ColorTable11"=dword:00c1b556
"ColorTable12"=dword:00756cdf
"ColorTable13"=dword:00dd77c5
"ColorTable14"=dword:007ac0e4
"ColorTable15"=dword:00e4dfdb