You need to add extras for common git subcommands like sl implements extras for the common options to ls.
Like "gti init" could have it start from a dead stop, "gti push" could have it push something in front of it, "gti pull" could have it pull a trailer behind it, etc.
Out of curiosity, for those who have typed gti, how do you type 'git'? For me, left index finger on G, right index on I, left middle on T. I'm wondering because I never make this particular typo, although I do have 'sl' installed and tend to see the steam locomotive once every few days.
As an experiment, I tried to type 'git init' very quickly a bunch of times and my typos were:
It happens with touch-typing. Left index finger for g and t, right middle for i. After pressing g, I move my left index finger over t while simultaneously moving my right middle finger over i. It isn't very probable, but sometimes the index finger gets to the t juuust before I press i, so I get gti, instead of git.
usually it's left-index, right-middle, left-index, but sometimes it's left-index, right-middle, left-middle. It seems to depend on what I'm going to type next, but I don't seem to have a lot of insight as to what my fingers are doing (or why) ;)
Wow, this could hardly be more different from how I type. I use only my middle and index fingers for all letters, moving them around as needed. I use left middle on 't' unless the next or previous letter is 'q', 'w', 'e', 'a' or 's', in which case I use left index for the 't'. It's not at all conscious, so I had to do some experimenting to figure that out.
I type very similarly, although I also tend to keep my arms angled in with index fingers on v and n, and do use ring fingers to type some letters, and pinky for modifiers. The main reason is to keep my wrists at a more comfortable angle. There is some overall greater movement of the hands vs. normal technique. I don't really see a problem with this.
I pretty much learned to type at a reasonable speed from MUDs, IRC, and other online chat. I'm >80wpm even using this nonstandard technique on QWERTY.
I type like this mainly on apple mba13/mbp keyboards (low travel, small); on a full-sized Das Keyboard at my desk, it's closer to conventional typing, although I still never hit a or l with pinky.
I've got a very similar style, using just my two index fingers for nearly everything (except from e.g. my left middle finger for Q and A, and my right thumb for space).
Like you say, it's not at all conscious. I think it's probably because I taught myself to type at a very young age, and never thought to do it any differently.
I can't speak how for graue, but I can offer my experience since I type almost the same way as graue does, except that I do use my ring fingers occasionally (mostly right ring finger, for stuff like "L") and my pinky for stuff like right shift and enter.
How and why? I started messing around with programming when I was a kid and I never learned typing or trained for it formally. When I started, I was just pecking with my index fingers, but since my mom and dad used a typewriter for their stuff, I was fully aware that pecking was suboptimal. They never offered any practical help with that, probably because they knew that I couldn't care less about how I type, as long as I could crank out my code. Long story short: I've developed my own technique, spontaneously. I'm aware that it's probably suboptimal, but it's good enough for me and I can't be bothered to retrain when there's so much more interesting stuff to do ;)
I have an interesting way of typing based on what I did as a kid too. Due to the large amounts of games I played, my left hand stays firmly over the wasd keys and my right hand moves a lot more than my left. I tend to type really loud and mostly use my index fingers, but also switch to using various other fingers when I'm typing quickly. I know its sub optimal, but I hit 80 wpm pretty consistently.
I would guess you did this test on your own keyboard, which you're used to. I wonder if the results would have been different if you'd used an unfamiliar one.
(I also wonder if the number of trials you did was statistically significant--but never mind!)
I just tried the same and had a very hard time typing gti. I had to slow down to get it; if I try to type it as quickly as possible I end up with either "git" or "gir". The parallization between hands just makes it too easy to type correctly. While your left pointer finger is making that long move from g to t, your right middle finger is already done pressing i.
When you use the same finger to type the G and T and a different finger to type I, it seems really impossible for me to accidentally type G-T-I.
The more common mistake is when you have to type two consecutive letters with the same finger but end up typing the next one earlier because its on a different finger (usually on the opposing hand).
Ex: 'teh' instead of 'the'- T,H with left index finger. E with left middle finger.
I also almost never type 'sl' though I do often type 'qw' in the Vim command line instead of 'wq'
Thanks for telling me that! I realized that I can make the same mistakes locally with comparable frequency. Perhaps it's just that I feel annoyed when I have to backspace with latency.
It predicts what the server will do with your input and displays the result (with an underline) until the server responds. This means typing is always at local speed even if the network is being flaky.
Why not just alias 'gti' to 'git'? I don't see what constructive purpose this serves. The only situation where it might matter is if you were using lots of different systems and didn't want to copy your aliases file over, though that's pretty simple nowadays, thanks to Git itself.
I've been tempted to do things like this alias, but it's a slippery slope; I don't want to train my muscle memory to type the wrong thing, and if it's silently accepted that's what is likely to happen. This way, the command gets run but you get a reminder that you typed the wrong thing, I guess.
Now I need something to stop me typing 'pythong' in shebangs.
What would there be to blog about if he did that? Blogging is a sign of intelligence, and if you just do something simple and don't tell anyone, how smart are you really?
I use an even more failsafe technique: typing the word "git" correctly each time.
Being a slow typer, I couldn't get bothered. I have about 30 alias in my bash_profile for git. These are the ones I use most:
alias ga='git add'
alias gs='git status'
alias gc='git commit'
alias gls='git ls-files' #lists all tracked files!
alias gg='git add -u; git commit -a -m "lazy commit"' # stage and commit everything tracked. So lazy ...
The latter I only use for committing non-code. Like my notes in org-mode.
The spokes of the GTI wheels often didn't appear to rotate on my screen because the frame rate was too high - I added a change to make the spokes change after every 5 ticks.
Tim Pope tried to implement interesting plugin for Vim. [1] It basically replaces frequently mistyped words with correct ones. I wouldn't support this method, but it is interesting how frequently I type some words wrong ('fucntion', for example). Instead, you should definitely try proper fingering.
As a pro piano, saxophone and guitar player, I'm prepping a rather lengthy blog post about proper fingering when typing, and the inadequacy of standard keyboard layouts, in particular, wrong placement of modifier keys as pivot points.
Your mentioning of piano made me think of a auto-correct plug-in for an electronic piano. In the spirit of sl and gti, it would have to play a Rickroll first.
I think a lot of people here are missing the point of 'sl', 'gti' et al. They're practical jokes, not training aids. Of course you can alias 'sl' to 'ls'! Of course some shells are smart enough to DWIM! 'sl' is there so we can watch the expression on the clewless n00b's face when he inevitably mistypes 'ls'-- probably in a moment of stress.
I had just started using Debian a few days before. I was trying in vain for hours to get a crappy Radeon card's direct rendering to work, futzing around with different settings. Suddenly a train roared across my terminal. "What the fu..." Eventually I figured out what happened and laughed my ass off.
I have something similar on one machine, but without the awesome ASCII graphics. It made me type git better each time but I find I'll miss the h on 'push' so I think that'll be next, the horrors that could be generated in ASCII for 'git pus' will surely help.
I've just used an alias file for some of my more common typos ('sl' is probably my most common) - nice to know I'm not the only one who makes silly typos with enough frequency to warrant some kind of technological solution!
You have zsh set to autocorrect sl to ls even if sl is installed? That seems a bit extreme, is that what the default behaviour is these days? I have all the autocorrection turned off in my setup.
This seems pretty dangerous. If you misspelled git you may also have misspelled the command you wanted to run, and especially if you set 1- or 2- character aliases in git you may run something you never intended to run.
For years I had several aliases for 'make' and after a while I literally couldn't remember how to spell it correctly without thinking quite hard. mkae, meka both looked equally valid.
It would be possible to implement "did you mean" feature in bash, even for command arguments (bash tab completion already knows them.) Not sure if worth it though.
Like "gti init" could have it start from a dead stop, "gti push" could have it push something in front of it, "gti pull" could have it pull a trailer behind it, etc.