Skip to content

Instantly share code, notes, and snippets.

@Ambratolm
Last active September 18, 2022 07:26
Show Gist options
  • Save Ambratolm/5499bfa034f13a72330827df73db0e9b to your computer and use it in GitHub Desktop.
Save Ambratolm/5499bfa034f13a72330827df73db0e9b to your computer and use it in GitHub Desktop.
Useful Cmder user aliases. To put in the file at "%CMDER_ROOT%\config\user_aliases.cmd".
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
;= [Default]
e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --show-control-chars -F --color $*
pwd=cd
clear=cls
unalias=alias /d $1
vi=vim $*
cmderr=cd /d "%CMDER_ROOT%"
;= [Edit-File]
;= "subl" is for Sublime Text editor, replace it with your favourite editor ("code" for VS Code)
alias-=subl "%CMDER_ROOT%\config\user_aliases.cmd"
history-=subl "%CMDER_ROOT%\config\.history"
node-=subl "%USERPROFILE%\.node_repl_history"
;= [Change-Directory]
desktop=cd "%USERPROFILE%\Desktop"
desk=cd "%USERPROFILE%\Desktop"
;= [Call-Command/General]
ar=alias /reload
alias-r=alias /reload
history-cls=break > "%CMDER_ROOT%\config\.history"
;= [Call-Command/NodeJS]
npmls=npm ls --depth 0
npmls-g=npm ls -g --depth 0
node-cls=cd %USERPROFILE% && break > .node_repl_history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment