1- Attaching Aliases to the native command line:
Steps in this stackoverflow answer.Quoting:
you may make the alias(es) persistent with the following steps,
Create a .bat or .cmd file with your
DOSKEY
commands.Run
regedit
and go toHKEY_CURRENT_USER\Software\Microsoft\Command Processor
Add String Value entry with the name
AutoRun
and the full path of your .bat/.cmd file.For example,
%USERPROFILE%\alias.cmd
, replacing the initial segment of the path with%USERPROFILE%
is useful for syncing among> multiple machines.This way, every time cmd is run, the aliases are loaded.
2- Using ConEMU.
Settings > Startup > Environment
@echo off
set PATH=%PATH%;C:\Program Files\Git\cmd
:: Common directories
DOSKEY lh=cd "C:\Program Files (x86)\Ampps\www\$*"
DOSKEY localhost=cd "C:\Program Files (x86)\Ampps\www\$*"
DOSKEY nodes = C:$Tcd "C:\nodes\$*"
:: Common Programs
DOSKEY ampps="C:\Program Files (x86)\Ampps\Ampps.exe"
DOSKEY gitcmd="C:\Program Files\Git\bin\sh.exe" --login -i
:: Trying to be Linux?
DOSKEY ls=dir
DOSKEY cat=type
DOSKEY ip=ipconfig
DOSKEY rm=rmdir /S $*$Tdel $*
DOSKEY mkdir=mkdir $1$Tcd $1
DOSKEY touch=copy nul $* > nul
DOSKEY clear=cls
:: Git
DOSKEY gitconfig="C:\Program Files\Sublime Text 3\sublime_text.exe" "C:\Users\DELL\.gitconfig"
DOSKEY git-save = git add .$Tgit stash save --keep-index
DOSKEY wip = git add .$Tgit commit -m "WIP"
DOSKEY gitlog = git log --pretty=oneline
:: Conemu
DOSKEY reload=cls$Tcmd cur_console
DOSKEY new=cmd -new_console:s$*
:: Laravel
DOSKEY serve=php artisan serve --host=127.0.0.1
DOSKEY artisan=php artisan $*
DOSKEY ar=php artisan $*
DOSKEY art=php artisan tinker
DOSKEY refresh=php artisan migrate:refresh --seed
:: PHP
DOSKEY php5="C:\Program Files (x86)\Ampps\php-5.6\php.exe" $*
:: Edit PHP.INI file
DOSKEY phpini="C:\Program Files\Sublime Text 3\sublime_text.exe" "C:\Program Files (x86)\Ampps\php\php.ini"
:: PHPUnit
DOSKEY p="vendor/bin/phpunit"
DOSKEY pf="vendor/bin/phpunit" --filter $*
:: Composer Dump Autoload
DOSKEY cda=composer dump-autoload
:: Node.js Commands
DOSKEY gw=gulp watch
DOSKEY nrw=npm run watch $*
DOSKEY nrp=npm run prod $*
DOSKEY nrt=npm run test $*
DOSKEY nrtdd=npm run tdd $*
DOSKEY nr=npm run $*
:: Windows Shutdown set seconds
DOSKEY st=shutdown /s /t $*
:: Shutdown abort
DOSKEY sta=shutdown /a