Crud, I was just about to install SP 3. I hope this doesn't actually booger DOSKey...
I've got all my command prompt shortcuts to open a window in a specific position with a specific font
and to execute a little setup script in my
D:\bin directory (something akin to
.profile or
.bashrc or
.cshrc or whatever your shell took).
prompt.bat
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
@echo off
set path=d:\bin;%PATH%
set dircmd=/ogn
set LS_OPTIONS=-bhACp --streams
doskey >nul
doskey cp=copy $*
doskey lesss=less -S $*
doskey deltree=rd /s/q $*
doskey vi=notepad $*
doskey dird=dir /ad /d $*
doskey python=C:\PROGRA~1\Python25\python.exe $*
doskey pythonw=C:\PROGRA~1\Python25\pythonw.exe $*
title Prompt
echo on
|
It doesn't look like much, but it does all the essential things: it initializes my path so that all my utils are first in line and sets up all the aliases (doskey macros --for others reading).
In my
D:\bin directory I've got little scripts to automatically initialize the programming environment on first use. For example:
g++.bat
1 2
|
@mpath a 0 C:\PROGRA~1\MinGW\bin
@"g++" %*
|
(The mpath.exe is a program I wrote for manipulating the command path on the command line. Currently my site is down but if you want a copy I'll be glad to send you one.)
In this case, the mpath command is equivalent to
@set PATH=C:\PROGRA~1\MinGW\bin;%PATH%
So, the first time I type "g++ something something something..." it finds my batch script, initializes the environment, and executes g++ as I would assume it would be executed. Thereafter, MinGW's bin directory is listed before my bin directory, and g++ gets executed directly.
:-)
Now if you'll excuse me, I've got to get back to Avatar Aang...