Live data from Hacker News

The Fuck – An app which corrects your previous console command

github.com

51–60 of 112 posts

Re: The Fuck – An app which corrects your previous console command

#51

Would be nice to have some form of autocorrect directly in the shell, especially if it was aware of common programs and so could also autocorrect options. Obviously we could think of a few cases with destructive outcomes--but that doesn't make it a bad feature. git stauts I mean, git knows enough to ask me "Did you mean this? status".

Add this to gitconfig file. It will automatically run the correct command after displaying what it is after a delay.

The value is in 0.1s (centiseconds) of seconds. So 20 means 2 seconds.

[help]

autocorrect = 20

OR run git config --global help.autocorrect 20

Re: The Fuck – An app which corrects your previous console command

#52
post #51

Would be nice to have some form of autocorrect directly in the shell, especially if it was aware of common programs and so could also autocorrect options. Obviously we could think of a few cases with destructive outcomes--but that doesn't make it a bad feature. git stauts I mean, git knows enough to ask me "Did you mean this? status".

Add this to gitconfig file. It will automatically run the correct command after displaying what it is after a delay. The value is in 0.1s (centiseconds) of seconds. So 20 means 2 seconds. [help] autocorrect = 20 OR run git config --global help.autocorrect 20

Wow, great tip, thanks. One command down, hundreds to go.

Re: The Fuck – An app which corrects your previous console command

#54
post #40

Earlier quoted context omitted.

Cannot for the life of me tell if this is a serious suggestion.

I've actually done this for a couple commands I screw up often enough -- I have this in my bashrc: alias dumbtypo="echo 'LEARN TO TYPE, MORON'" alias sl="dumbtypo; ls" alias rbuy="dumbtypo; ruby" alias pytohn="dumbtypo; python" alias brwe="dumbtypo; brew" alias arhcey="dumbtypo; archey"

I'm incredulous that 'pythong' is not in there.

I can't not-type it.

Re: The Fuck – An app which corrects your previous console command

#55

Earlier quoted context omitted.

alias gp="git push" has probably saved me hours of my life

Amen. My bashrc has so many of these, and they're probably among the most common commands I use daily!: alias gs="git status" alias gb="git branch" alias grh="git reset --hard" alias gcdf="git clean -df" alias gf="git fetch" alias gp="git pull" alias gdom="git diff origin/master" alias gdomn="git diff --name-status origin/master" alias gd="git diff" alias gl="git log" alias glm="git log --author " alias gc="git check…

I use gcm for `git commit -m `, interestingly.

I only use a few git aliases, most things I'd rather type out.

Re: The Fuck – An app which corrects your previous console command

#56

Earlier quoted context omitted.

alias gp="git push" has probably saved me hours of my life

Amen. My bashrc has so many of these, and they're probably among the most common commands I use daily!: alias gs="git status" alias gb="git branch" alias grh="git reset --hard" alias gcdf="git clean -df" alias gf="git fetch" alias gp="git pull" alias gdom="git diff origin/master" alias gdomn="git diff --name-status origin/master" alias gd="git diff" alias gl="git log" alias glm="git log --author " alias gc="git check…

Aliasing gs may be a bad idea, there is actually a command named like that (it's part of GhostScript)

Re: The Fuck – An app which corrects your previous console command

#58
post #35
post #2

Another step towards the Anti-Mac user interface. https://www.nngroup.com/articles/anti-mac-interface/

What would be the Mac design principle way of doing this then? Would every command line tool then be an Anti-Mac user interface?

"Anti-Mac interface" doesn't seem to be pejorative in this context.

Re: The Fuck – An app which corrects your previous console command

#59

Earlier quoted context omitted.

alias gp="git push" has probably saved me hours of my life

Amen. My bashrc has so many of these, and they're probably among the most common commands I use daily!: alias gs="git status" alias gb="git branch" alias grh="git reset --hard" alias gcdf="git clean -df" alias gf="git fetch" alias gp="git pull" alias gdom="git diff origin/master" alias gdomn="git diff --name-status origin/master" alias gd="git diff" alias gl="git log" alias glm="git log --author " alias gc="git check…

Am I a bad person for creating SVN-style aliases for git?

From my .gitconfig:

    [alias]
            st = status
            ci = "!git add -u && git commit"
            di = diff
I come from an SVN background, I've since switched to Mercurial for my personal projects, and intensely dislike git, but have to use git at work, so I finally said "enough is enough" and made aliases so I can use git like svn/hg.
Post reply on HN