I’m pretty much a Unix type of guy. At home I use OS X and FreeBSD, and for the last six years I developed on HP-UX. But now I’m working on Windows and I find that I miss some of the functionality of Unix.
I recently found something that might be obvious to all you long time Windows users, but for me was a revelation - I can have command aliases just like with Unix. You can use the DOSKEY command to load a macro definition file, and can set an autorun command for the command window with an entry in the registry.
So now cd works like I’m used to - if I don’t give it a path, it returns home. If I do give it a path, it goes to that directory. My redefined cd is:
CD=if “$1″ == “” (pushd %HOMEDRIVE%%HOMEPATH%) else (PUSHD $1)
I use pushd because I have a back macro that does a popd (once again, just something I had at the last job). I also find myself typing ls and clear a lot. So I now have macros to define those as well.
Just like at my last job, I find that I work in some directories more often than others. So I have macros to make changing to those paths much easier to type. So, for instance, if I want to look at our publication tools aml scripts, I can just type ptl and it does a PUSHD to that network drive directory.
Like I said, maybe obvious to old hands at windows, but something new to me and something that already is making my life easier.









0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment