10 ms·
I do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because t
by perlgeek 9y ago
I do. And I also write "vim vim thefile.txt" and stuff like that.
Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.
- gboudrias 9y agoIf debian ever starts shipping with a util called "gi", I'm screwed!
- projektfu 9y agoI always typed rebnoot, so I patched Netbsd to allow rebnoot. Then I patched it still so it would say, "Rebnooting". Fun times.
- mypalmike 9y agoCan't tell if serious...
- popcorncolonel 9y agoKnowing software developers, probably entirely serious.
- tosstossy 9y agoThe seasoned sysadmins are a little more careful before smacking the enter key...
- TheSoftwareGuy 9y agoIt’s probably just a shell script or an alias
- projektfu 9y agoAn alias would work but it wouldn't say rebnooting. That was my initial fix. But I was learning things at the time and I learned how to recompile parts of the distribution. I also learned how programs in Unix could invoke different effects based on name. Coming from DOS, it was a real surprise that reboot was a link to shutdown.
- kelnos 9y agoYes! I do all of those things too. git git, vim vim, and 'gi tpull' and 'gi tpush' and everything. I think any command where you might start to type something out, but then need to refer to another window or session to figure out what else you want to type, is vulnerable to this kind of mistake.
- Aaargh20318 9y agoTry The Fuck: https://github.com/nvbn/thefuck/blob/master/README.md https://github.com/nvbn/thefuck/blob/master/README.md
- _nothing 9y agoI have The Fuck because I think the premise is hilarious, though I don't use it as much as I'd like since it's kind of slow for me...
- masklinn 9y agoIt's apparently grown an "instant mode" which goes much faster: https://github.com/nvbn/thefuck/blob/master/README.md#experimental-instant-mode https://github.com/nvbn/thefuck/blob/master/README.md#experi...
- jmcgough 9y agoFor the latter, https://github.com/nvbn/thefuck https://github.com/nvbn/thefuck is great and pretty satisfying to use. (me earlier this month: https://twitter.com/sailoremo/status/908390247548911617 https://twitter.com/sailoremo/status/908390247548911617)
- chris_wot 9y agoIf only there was a git shell...
- _joel 9y agoThere is, but it's just a restricted login shell. I see what you mean though
- davedx 9y agoI just alias 'pull' to git pull, it's much nicer. Also 'push' and a few of the other most common ones.
- crehn 9y agoOr alias to gp, gl, gd, ga, gmv, grm, gsh, glg, gcm, gcam, gpuo, gdwd, gpuom, ...
- labster 9y agoglwt
- pluma 9y agoYou're joking but... alias g='git status -sb' alias ga='git add' alias gac='git commit --amend' alias gb='git branch' alias gbb='git checkout -b' alias gbm='git branch --merged' alias gbn='git branch --no-merged' alias gc='git commit -m' alias gcp='git cherry-pick' alias gco='git checkout' alias gd='git diff' alias gdc='git diff --cached' alias gg='git status' alias gl='git log --graph --pretty=format:"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit' alias gla='git log --all --graph --pretty=format:"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit' alias ggpublish='git push && git push --tags && npm publish' alias gp='git pull --rebase && git push' alias gpp='git push && git push --tags' alias gpl='git pull --rebase --prune' alias gpt='git pull --rebase && git push --tags' alias grb='git rebase' alias grc='git rebase --continue' alias gsp='git stash ; gp ; git stash pop' alias unfuckgitremote='git branch --set-upstream-to=origin/`git rev-parse --abbrev-ref HEAD` `git rev-parse --abbrev-ref HEAD`' I have to admit I use `unfuckgitremote` more often than you'd hope.
- auscompgeek 9y agoInstead of `unfuckgitremote`, why not just use `git push -u`?
- 9y ago
- dogruck 9y agoPersonally, I don't want my typos corrected when I enter commands. I prefer the negative reinforcement to encourage fewer errors. I also don't mind an occasional error. Not hatin. Just wondering if I'm alone.
- LeoPanthera 9y agoI'm the same, though I create tiny aliases for commonly typed commands. gp = "git pull", and so on.
- Wilya 9y agoYou probably aren't alone, since commands that punish you when you mistype exist. Check out sl[0] or gti[1]. [0] https://github.com/mtoyoda/sl https://github.com/mtoyoda/sl [1] http://r-wos.org/hacks/gti http://r-wos.org/hacks/gti
- dogruck 9y agoHa -- both are amusing.
- toong 9y agoIt's not only commands. My spelling skills took a dive, as google got better and better in guessing what I actually want to search for. Can you disable that feature somewhere ? The suggestion is good, but automatically doing the corrected query is not!
- mrybczyn 9y agoalias p='git pull' why type 8 characters 100 times a day, when you can type 1?
- aws_ls 9y agoGot a weird idea reading this. How about checking for all 127 error codes returned by $? (this is the return code that the shell gets, following a failed command, due to command not found). This process should happen behind the scenes. And then train a RNN for translating it to the following command, which returns a success code. Perhaps, we need to add a few checks that successful command has the same intent as the one which returned 127 error code to the shell.
- sli 9y agoI put my most common git commands on keyboard macros mostly for this reason.