Skip to content

Instantly share code, notes, and snippets.

@travelhawk
Last active June 28, 2018 12:53
Show Gist options
  • Save travelhawk/a8661c776013dce77240440c698a9387 to your computer and use it in GitHub Desktop.
Save travelhawk/a8661c776013dce77240440c698a9387 to your computer and use it in GitHub Desktop.
Define own environment for cmd for aliases, shortcuts and adding to the PATH
# README
#############################################################################
Installation
1. clone the the env.cmd file and place it somewhere on your computer
2. create a shortcut to c:\windows\system32\cmd.exe
3. set the target to C:\Windows\System32\cmd.exe /K path-to-file/env.cmd
@echo off
:: Temporary system path at cmd startup
set PATH=%PATH%;"
:: Add to path by command
DOSKEY add_python27=set PATH=%PATH%;"C:\Python27\"
:: Linux Separator
DOSKEY /=\
:: General Commands
DOSKEY ls=dir /B
DOSKEY rm=del $*
DOSKEY rmd=rmdir /S /Q $*
DOSKEY cp=copy $*
DOSKEY mv=move $*
DOSKEY alias=notepad %~f0
DOSKEY macros=DOSKEY /macros
:: Custom Commands
DOSKEY activemq=START CALL "C:\Program Files\apache-activemq-5.15.4\bin\activemq.bat" start
:: SSH
:: Docker (password: tcuser)
DOSKEY ssh-docker=ssh -p 50391 docker@localhost
DOSKEY ssh-server=ssh htects@hmtintern.de
:: Common directories
DOSKEY download=cd "%USERPROFILE%\Download\"
DOSKEY repos=cd "D:\repos\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment