Add option to reload aliases from file

Add a quick way to reload the aliases file in the current shell using:

    alias /reload
This commit is contained in:
Greg Lucas 2014-10-24 15:39:37 -04:00
parent 20c9ba207d
commit 717b556d7a

View File

@ -1,5 +1,6 @@
@echo off @echo off
if ["%1"] == ["/?"] goto:p_help if ["%1"] == ["/?"] goto:p_help
if ["%1"] == ["/reload"] goto:p_reload
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
::validate alias ::validate alias
setlocal setlocal
@ -20,6 +21,11 @@ echo Alias created
endlocal endlocal
goto:eof goto:eof
:p_reload
doskey /macrofile="%CMDER_ROOT%\config\aliases"
echo Aliases reloaded
goto:eof
:p_help :p_help
echo.Usage: echo.Usage:
echo. alias name=full command echo. alias name=full command