The problem with living in two worlds
I started working with Apple products about 2 years ago after having a Windows PC in the house since 1995. I instantly loved how I no longer had to worry about viruses…kind of, and I loved how everything just worked so well together.
After that it was all over for me and I dove into the Apple ecosystem head-first. I bought a MacBook Pro, then a MacBook Air, then iPhone, iPad, Apple TV, Apple Watch, etc, etc.
The problem was that I was a C#.NET developer. C# is quintessentially a Windows Technology, (until recently). Even though it is possible to now develop Windows Applications and Web Applications on a Mac, it isn’t always as straight forward as you would like.
At least for most of what I do and 100% of what I do at work, I have to develop on a Windows Machine. It’s just the nature of doing business at a Windows shop. *Disclaimer: There are more and more Macs showing up in the workplace so there still is some small hope.
Journey to find Doskeys
The main issue was that I do a lot of my work on the command line. I’m not an uber-hacker or anything I just find that for most things I feel more comfortable on the command line. Might have something to do with my first PC being a Windows 3.11 Machine.
I played lots of games back then and one was required to open a DOS prompt and play with Expanded Memory, Extended Memory, and Shadow Memory, until you found the magic configuration that would allow you to run your game.
I have no data to back this up but I would say that my current computer has more memory than the entire town I lived in in 1995. So command line isn’t as ubiquitous as it was 20 years ago.
So what’s the big deal with DosKeys?
There are certain commands that get burned into your memory: Dir, cd, md, del, cls, ls, clear, mkdir, to name a few. I would find myself at work on my Windows computer typing ls several times a day. It got on my nerves to the point that I decided to do something about it. I stumbled upon this article on github and decided to try and do something AWESOME!
I setup the following aliases on my work computer:
@echo off DOSKEY gs=git status DOSKEY add=git add . DOSKEY gp=git push DOSKEY ls=dir DOSKEY clear=cls DOSKEY sudo=echo This Isn't Really Unix Dummy DOSKEY system=cd C:\Windows\System32 DOSKEY home=cd C:\Users\tmyers DOSKEY flow=git flow init -fd DOSKEY hosts=code C:\Windows\System32\drivers\etc\hosts DOSKEY root=cd / cd /
That basically solved my problem, and then I just expanded on it with some common git commands and then an easter egg for good measure. You can read about how I set my system up on my github page here. You can get a lot more fancy with your doskeys if you want to.
You can set them up to allow you to pass in variables so you could for example pass a command line argument to a program you want to run from the command line.