

I've finally implemented the command I keep typing all day: gti - colinprince
http://r-wos.org/hacks/gti

======
rcthompson
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.

------
graue
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:

    
    
        git niti
        git niit
        git itnit
        giti nit
    

but never 'gti'.

~~~
jrockway
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.

I never type "sl" either.

~~~
statictype
I was thinking along the same line.

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'

~~~
zhoutong
A even more challenging task (at least for me) is to type a lower case letter
after a symbol that requires Shift.

For example, I frequently type :Wq instead of :wq, especially in a SSH
session, which adds some latency to the release of Shift key.

EDIT: SSH has nothing to do with this. It's just an emotional impact on the
extra hassles of backspacing with latency.

~~~
quesera
I do this all the time too, but I think you're wrong about the ssh difference.

ssh doesn't see the keystroke until it's fully formed by your OS and/or window
manager, so there can be no latency to the release of shift.

~~~
zhoutong
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.

~~~
jrockway
Use mosh instead: <http://mosh.mit.edu/>

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.

------
w1ntermute
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.

~~~
jlgreco
It serves the same purpose that sl serves. A minor somewhat amusing annoyance
that gets tiresome over time, forcing you to drop the bad habit.

Aliasing it to 'sleep 2 ; git' would do the same thing, but would lack the
embarrassment and amusement that the animation gives.

Of course mostly that is just an excuse. _"Because it is fun"_ is really the
only reason that there needs to be.

------
mcrider
For me I always mistype 'master' as 'amster'. In my mind, I've invented a
friendly little mascot, the Git Hamster.

~~~
itsboring
Holy crap, I do this exact thing, and had the same thought about the git
hamster. That and "gitp ush".

------
FrojoS
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.

I also found it very convenient to have

    
    
        alias eb='emacs ~/.bash_profile'
    

makes me edit my dash_profile almost every day.

~~~
sic1
I'm with this guy. Basically the same setup.

I still alias 'git' to 'g' also for all the other commands needed throughout
the day. Not sure why yall would keep typing 'it'.

I do enjoy the ascii car tho. Cheers to that. Probably will set this up
anyways!

------
dickfickling
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.

<https://github.com/dickfickling/gti>

Maybe even just every two ticks (% 4 < 2) would be fine.

edit: Forgot to say: wonderful idea and nice implementation! Simple yet
satisfying.

------
philwelch
Ah, in the finest tradition of that other great Unix utility, sl:
[http://www.cyberciti.biz/tips/displays-animations-when-
accid...](http://www.cyberciti.biz/tips/displays-animations-when-accidentally-
you-type-sl-instead-of-ls.html)

------
dsirijus
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.

[1] <http://www.vim.org/scripts/script.php?script_id=1545>

~~~
Someone
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.

------
coldpie
From my standard bashrc:

    
    
      alias l='ls'
      alias vmi='vim'
      alias ivm='vim'
      alias grpe='grep'
      alias amke='make'
      alias mkae='make'
      alias maek='make'
    

Fixes most everything I screw up regularly :)

------
splatzone
Oh I get it. It's a GTI, innit.

------
KC8ZKF
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.

~~~
peterwwillis
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.

------
Pawka
Try zsh (z shell). It has auto correction for typos:

pawka@yoda ~/Desktop> gti

zsh: correct 'gti' to 'git' [nyae]?

~~~
freestyler
After I switch to zsh, I miss the `sl' so much.

~~~
jlgreco
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.

~~~
freestyler
I just found that it's oh-my-zsh's feature. It alias sl to ls.

------
grn
I have:

    
    
      "\C-ga": "git add "
    

and so on in my .inputrc
(<https://github.com/grn/dotfiles/blob/master/inputrc>). This allows me to
type Ctrl-g, a to insert "git add ". It makes typing faster and is clearer
than aliases.

------
nicholassmith
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.

------
suresk
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!

------
veyron
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.

------
Toenex
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.

------
tsigo
As much as I type git, I just alias it to 'g' and be done with it.

------
praptak
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.

------
mp99e99
Maybe someone on HN can invent something that shocks you when you type the
wrong command instead! Funny post, and GTI's had great mileage

------
ollybee
I have an amdin on some servers. don't punish yourself with ascii animations
make it launch gtypist or similar.

------
jordanthoms
You can do the same for ls - apt-get install sl IIRC. Generally more
productive to just do an alias though :)

------
the_cat_kittles
./mangae.py runserver, or some variant... another great one!

------
timinman
Ha ha! 'More of a reward than a punishment.

------
peejaybee
Is this going to be available on gtihub?

------
noodol
i love this lol

------
mlvljr
nitty gitty :)

------
benmathes
alias g='git';

