The configuration about windows command line
- Ansicon
- A bat file
-
ANSICON:
-
Create bat file:
-
Characters help by using :
> prompt /? -
Example (run.bat):
@echo prompt $E[1;31m$d$E[1;32m$s$t$s$E[1;31m$g$g$s$E[0;33m
-
-
Add bat file into Regedit:
- Go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont - Create Font Type:
- Type: String
- Key Name: Only defined by '0' (zero)
E.g.: '0', '00', ... , '00..0' - Key Value: Font Name (Only monospace series)
E.g.:
'000' => Monaco '0000' => Courier New ... - By command:
c:\> reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "0000" /t REG_SZ /d "Consolas" /f
- Running in command line: (or chcp 850)
> chcp 437 - Code page regist location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage
- Open
regeditby Win + R -> Inputregedit - Go to
HKEY_CURRENT_USER->Console - Add keyword:
"CursorSize"=dword:00000006 - For Example:
[HKEY_CURRENT_USER\Console] "CursorSize"=dword:00000006 [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] "CursorSize"=dword:00000006
c:\> reg add "HKCU\Console" /v CursorSize /t REG_DWORD /d "1" /f
- Create .cmd file (E.g.: %WINDIR%\alias.cmd)
- It can be copied from folder *Default_CommandLine\Aliases*
- Add the full file path into regist: HKEY_CURRENT_USER\Software\Microsoft\Command Processor
- CMD command:
c:> reg add "HKCU\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "%WINDIR%\alias.cmd"
- CMD command:
- Copy the console.xml to
%APPDATA%\Consolefolder - If the console is from pythonxy
- Copy
pythonxy\console\to$PYTHONXYHOME\console. - For example, copy it to
C:\pythonxy\console\
- Copy
- Tab1: Marslo - IPython (sh)
- Tab2: Marslo - Ipython (Qt)
- Tab3: Python
- Tab4: Command Line
- Tab5: IPython (sh) [Original]
- Tab6: Ipython (Qt) [Original]
ctrl + s: Open setting dialogCtrl + F1: Open Tab1Ctrl + F<N>: Open Tab<N>Ctrl + 1: Switch to Tab1Ctrl + <N>: Switch to Tab<N>
Left + Shift: Copy/clear selectionLeft + Ctrl: Drag windowLeft: Select textRight: Paste text
- Copy the tcstart.btm to
%PROGRAMFILES%\JPSoft\TCCLE13
- Open profile file:
> gvim $PROFILE - Set cursor size:
[Console]::CursorSize = 6 $HOST.UI.RawUI.CursorSize = 6 - List all files:
function la { $currentpath = Get-Location Get-ChildItem $currentpath -force } - List all hidden file (start with ".")
function l. { # Get-ChildItem . -Force | Where-Object { $_.Attributes -like "*Hidden*" } | Select FullName Get-ChildItem . -Force | Where-Object { $_.Attributes -like "*Hidden*" } } - Tree
function tree { $currentpath = Get-Location Get-ChildItem $currentpath -recurse } - Go to some path
function prog { Set-Location "C:\Program Files" } - Cat some content
function alias { Get-Content "c:\WindowsPowerShell\aliases_Marslo.txt" }
- Profile issue:
- Problem:
Microsoft.PowerShell_profile.ps1 cannot be loaded - Fix method:
> Set-ExecutionPolicy -ExecutionPolicy Unrestricted > Get-ExecutionPolicy > Get-ExecutionPolicy -list - Problem:
- [The color prompt reference](http://adoxa.hostmyway.net/ansicon/ANSI Prompt Colours.txt)
- 3x and 4x:
- 3x: Front Color
- 4x: Background Color
- Basic format:
$E[a;3b;c;4dmor$E[0;a;3b;c;4dm- For example:
$E[31;46m: Front color: dark red; Background color: dark green ( == $E[0;31;46m == $E[0;31;6;46m)$E[1;31;46m: Front color: light red; Background color: dark green ( == $E[1;31;1;46m)$E[1;31;4;46m: Front color: light red; Background color: light green
- a (control dark/light front color):
0 == a: Set the dark front color1 == a: Set the light front color7 == a: Reversal the front color and background color
- b (front color):
1: Red2: Green3: Yellow4: Blue5: Magenta6: Cyan7: White
- c (control dark/light/reversal background color):
0 == c: Set front color as dark white4 == c: Set light background color1 or 6 == c: Set dark background color7 == c: Reversal the front color and background color
- d (background color):
1: Red2: Green3: Yellow4: Blue5: Magenta6: Cyan7: White
- For example:




