7 ms·
I've finally implemented the command I keep typing all day: gti
- dickfickling 14y agoThe 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 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.
- w1ntermute 14y agoWhy 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.
- sjtgraham 14y agoIt's more fun.
- simdiab 14y agoYou're right. How dare we have fun on the internet!?
- jrockway 14y agoWhat 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.
- jlgreco 14y agoIt 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.
- misnome 14y agoI'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.
- the_cat_kittles 14y ago./mangae.py runserver, or some variant... another great one!
- deleted 14y ago[deleted]
- philwelch 14y agoAh, in the finest tradition of that other great Unix utility, sl: http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html http://www.cyberciti.biz/tips/displays-animations-when-accid...
- graue 14y agoOut 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 14y agoI 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.
- deleted 14y ago[deleted]
- statictype 14y agoI 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 14y agoA 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.
- Pawka 14y agoTry zsh (z shell). It has auto correction for typos: pawka@yoda ~/Desktop> gti zsh: correct 'gti' to 'git' [nyae]?
- freestyler 14y agoAfter I switch to zsh, I miss the `sl' so much.
- jlgreco 14y agoYou 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 14y agoI just found that it's oh-my-zsh's feature. It alias sl to ls.
- rcthompson 14y agoYou 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.
- splatzone 14y agoOh I get it. It's a GTI, innit.
- suresk 14y agoI'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!
- tsigo 14y agoAs much as I type git, I just alias it to 'g' and be done with it.
- dsirijus 14y agoTim 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 http://www.vim.org/scripts/script.php?script_id=1545
- Someone 14y agoYour 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.
- mcrider 14y agoFor me I always mistype 'master' as 'amster'. In my mind, I've invented a friendly little mascot, the Git Hamster.
- itsboring 14y agoHoly crap, I do this exact thing, and had the same thought about the git hamster. That and "gitp ush".
- FrojoS 14y agoBeing 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 14y agoI'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!
- jordanthoms 14y agoYou can do the same for ls - apt-get install sl IIRC. Generally more productive to just do an alias though :)
- praptak 14y agoIt 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.
- timinman 14y agoHa ha! 'More of a reward than a punishment.
- mp99e99 14y agoMaybe someone on HN can invent something that shocks you when you type the wrong command instead! Funny post, and GTI's had great mileage
- grn 14y agoI have: "\C-ga": "git add " and so on in my .inputrc (https://github.com/grn/dotfiles/blob/master/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.
- benmathes 14y agoalias g='git';
- Toenex 14y agoFor 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.
- noodol 14y agoi love this lol
- ollybee 14y agoI have an amdin on some servers. don't punish yourself with ascii animations make it launch gtypist or similar.
- mlvljr 14y agonitty gitty :)
- nicholassmith 14y agoI 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.
- veyron 14y agoThis 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.
- coldpie 14y agoFrom 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 :)
- peejaybee 14y agoIs this going to be available on gtihub?
- KC8ZKF 14y agoI 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 14y agoI 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.