News for hackers. Stuff that matters.
Re:Git git git git git by perlgeek on Tuesday September 26, 2017 @03:52PM (#15341976)
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.

Re:Git git git git git by projektfu on Tuesday September 26, 2017 @04:43PM (#15342329)
I always typed rebnoot, so I patched Netbsd to allow rebnoot. Then I patched it still so it would say, "Rebnooting". Fun times.
Re:Git git git git git by dbcurtis on Wednesday September 27, 2017 @12:08AM (#15344848)
Relatable. For years, I aliased mroe to more. Now I alias mroe and more to less.

My wife drafts a lot of legal documents, and has a problem with "doe snot". Which unfortunately the spelling checker is perfectly happy with.

Re:Git git git git git by Singletoned on Wednesday September 27, 2017 @04:22AM (#15345819)
There's defintitely room for an advanced spell checker that can say "This is valid, but probably wrong".
Re:Git git git git git by MikeTV on Wednesday September 27, 2017 @12:17PM (#15349286)
I just ran across Language Tool[0] recently. Free, open-source proofreading lib, can be run totally locally. Uses Google Ngrams to check for often confused words. Didn't correct "doe snot" in my synthetic test just now, but that seems like a plausibly minor extension of existing functionality.

[0] https://www.languagetool.org/

Re:Git git git git git by goblin89 on Wednesday September 27, 2017 @09:39AM (#15347663)
There’s at least one product trying to address the issue with “valid, but probably wrong” typos. It’s called Grammarly and for some unfathomable reason it gets advertised to me a lot on YouTube whenever Google detects I’m in South Korea; I believe they are seriously mistargeting their marketing efforts.

(That said, if it were me, I’m not sure if I would give up typing doe snot every once in a while.)

Re:Git git git git git by salvar on Wednesday September 27, 2017 @04:56AM (#15345993)
Defiantly.
Re:Git git git git git by Ajedi32 on Wednesday September 27, 2017 @09:25AM (#15347543)
The spell checker in Chrome can already do that to some extent. For example, "The men walked over their to grab they're food." gets corrected: https://i.imgur.com/NR4zyVA.png
Re:Git git git git git by Fnoord on Wednesday September 27, 2017 @11:20AM (#15348650)
command-not-found [1] could implement that, if it isn't implemented already. I remember a Linux distribution with an application which would let a train pass in a few seconds after typing typical commands wrong. Trust me, you'll learn to type correct when that happens because it is very annoying.

EDIT: as mentioned below, it is called 'sl'

[1] https://wiki.ubuntu.com/CommandNotFoundMagic

Re:Git git git git git by jbergens on Thursday September 28, 2017 @02:31AM (#15355105)
The spelling checker in Word has some grammar rules, try to configure those if she uses Word.
Re:Git git git git git by polkijunk on Wednesday September 27, 2017 @04:29AM (#15345854)
defintitely
Re:Git git git git git by vollmond on Wednesday September 27, 2017 @11:01AM (#15348432)
My standard .bashrc aliases cd.. and cd- to the same thing with a space. Eliminating minor annoyances and focus-disruptors is great.
Re:Git git git git git by ytjohn on Tuesday September 26, 2017 @09:03PM (#15344068)
Our org has a bunch of related miscellaneous projects called "pantry". Basically, if it doesn't fit standalone, you put it in the pantry. It works out better than you think, except when someone is doing a webex and misses an r.
Re:Git git git git git by _pmf_ on Wednesday September 27, 2017 @02:22AM (#15345334)
"Rebnooting" sounds like it should be a real word; probably a military term.
Re:Git git git git git by mypalmike on Tuesday September 26, 2017 @05:45PM (#15342790)
Can't tell if serious...
Re:Git git git git git by popcorncolonel on Tuesday September 26, 2017 @06:05PM (#15342937)
Knowing software developers, probably entirely serious.
Re:Git git git git git by tosstossy on Tuesday September 26, 2017 @09:00PM (#15344056)
The seasoned sysadmins are a little more careful before smacking the enter key...
Re:Git git git git git by mcv on Wednesday September 27, 2017 @04:52AM (#15345978)
Depends on the importance of the system. If it's a fairly unimportant home system that's excessively backed up, it's fairly easy to live life on the edge.
Re:Git git git git git by Fnoord on Wednesday September 27, 2017 @11:25AM (#15348717)
rm -i and rm -f (as well as mv and cp) allow to specify certainty not merely for everyone above UID 0.

Keyword: Backups.

Re:Git git git git git by TheSoftwareGuy on Tuesday September 26, 2017 @07:32PM (#15343587)
It’s probably just a shell script or an alias
Re:Git git git git git by projektfu on Tuesday September 26, 2017 @09:27PM (#15344167)
An 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.
Re:Git git git git git by therein on Wednesday September 27, 2017 @03:23AM (#15345587)
So I am assuming you ended up patching the `shutdown` binary to print `Rebnooting` if exec'd with the `rebnoot` name?

This is similar to how busybox binary implements a bunch of the tools from coreutils etc.

Re:Git git git git git by Aaargh20318 on Tuesday September 26, 2017 @06:30PM (#15343162)
Re:Git git git git git by _nothing on Tuesday September 26, 2017 @10:15PM (#15344367)
I 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...
Re:Git git git git git by masklinn on Wednesday September 27, 2017 @03:38AM (#15345633)
It's apparently grown an "instant mode" which goes much faster: https://github.com/nvbn/thefuck/blob/master/README.md#experi...
Re:Git git git git git by jmcgough on Tuesday September 26, 2017 @11:50PM (#15344784)
For the latter, https://github.com/nvbn/thefuck is great and pretty satisfying to use.

(me earlier this month: https://twitter.com/sailoremo/status/908390247548911617)

Re:Git git git git git by gboudrias on Tuesday September 26, 2017 @04:13PM (#15342118)
If debian ever starts shipping with a util called "gi", I'm screwed!
Re:Git git git git git by sandov on Tuesday September 26, 2017 @04:18PM (#15342155)
Depending on how the scritp is written, you're screwed only if it comes with a tpull command.
Re:Git git git git git by jshap70 on Tuesday September 26, 2017 @04:17PM (#15342147)
`alias gi="rm -rf /"`
Re:Git git git git git by kzrdude on Tuesday September 26, 2017 @04:29PM (#15342236)
--no-preserve-root
Re:Git git git git git by stefco_ on Wednesday September 27, 2017 @09:52AM (#15347784)
sudo
Re:Git git git git git by gbrown on Tuesday September 26, 2017 @04:31PM (#15342251)
Suicide git
Re:Git git git git git by amag on Wednesday September 27, 2017 @06:38PM (#15352981)
sudocide
Re:Git git git git git by kelnos on Tuesday September 26, 2017 @05:29PM (#15342692)
Yes! 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.

Re:Git git git git git by aws_ls on Wednesday September 27, 2017 @10:29AM (#15348103)
Got 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.

Re:Git git git git git by davedx on Wednesday September 27, 2017 @01:25AM (#15345118)
I just alias 'pull' to git pull, it's much nicer. Also 'push' and a few of the other most common ones.
Re:Git git git git git by crehn on Wednesday September 27, 2017 @01:41AM (#15345189)
Or alias to gp, gl, gd, ga, gmv, grm, gsh, glg, gcm, gcam, gpuo, gdwd, gpuom, ...
Re:Git git git git git by pluma on Wednesday September 27, 2017 @05:56AM (#15346245)
You'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.
Re:Git git git git git by auscompgeek on Wednesday September 27, 2017 @08:35AM (#15347115)
Instead of `unfuckgitremote`, why not just use `git push -u`?
Re:Git git git git git by jasonm23 on Wednesday September 27, 2017 @10:06AM (#15347891)
origin head
Re:Git git git git git by _joel on Wednesday September 27, 2017 @09:01AM (#15347318)
Re:Git git git git git by labster on Wednesday September 27, 2017 @01:59AM (#15345244)
glwt
Re:Git git git git git by chris_wot on Wednesday September 27, 2017 @12:03AM (#15344834)
If only there was a git shell...
Re:Git git git git git by _joel on Wednesday September 27, 2017 @09:04AM (#15347346)
There is, but it's just a restricted login shell. I see what you mean though
Re:Git git git git git by sli on Wednesday September 27, 2017 @11:23AM (#15348698)
I put my most common git commands on keyboard macros mostly for this reason.
Re:Git git git git git by mrybczyn on Wednesday September 27, 2017 @09:45AM (#15347710)
alias p='git pull'

why type 8 characters 100 times a day, when you can type 1?

Re:Git git git git git by dogruck on Wednesday September 27, 2017 @01:27AM (#15345137)
Personally, 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.

Re:Git git git git git by Wilya on Wednesday September 27, 2017 @01:58AM (#15345243)
You 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 [1] http://r-wos.org/hacks/gti

Re:Git git git git git by dogruck on Wednesday September 27, 2017 @02:30AM (#15345366)
Ha -- both are amusing.
Re:Git git git git git by LeoPanthera on Wednesday September 27, 2017 @01:39AM (#15345185)
I'm the same, though I create tiny aliases for commonly typed commands. gp = "git pull", and so on.
Re:Git git git git git by toong on Wednesday September 27, 2017 @03:31AM (#15345611)
It'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!