Live data from Hacker News

The Fuck – An app which corrects your previous console command

github.com

41–50 of 112 posts

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

#42

Every day: $ git pish $ fuck

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 checkout"
    alias gcm="git checkout master"

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

#43

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…

Or how about git commit with a dummy message? :)

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

#45
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".

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

#46
post #18

Earlier quoted context omitted.

Rule for this behavior disabled by default, but you can enable it. Also you can disable confirmation or use `fuck -y` for more fun.

I like how you named and styled the command after how many terminal users actually approach these situations. 1. Hurriedly type something to solve a pressing problem. It doesn't work but tells you enough the fix should be obvious to a machine. 2. Mutter or shout "Fuck!" in head depending on how obvious problem was, how often it repeats, or just how long it takes to redo it. 3. Perform the correct action. Your model i…

Of course, the drawback is that the machine doesn't really know what you intended without more context than a single command line. Often it can make a good guess, but not always and sometimes it'll guess wrong, perhaps disastrously so.

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

#47

Earlier quoted context omitted.

It is-- what is the perceived downside?

You have a giant list of common typos, making you a worse and worse typer as years go on, until you are mashing your head on the keyboard to type anything.

I dunno, I don't think that would really happen. I'm always trying to type the same word (I don't say "pish" in my head, after all, I think "push"), so it doesn't seem to be a random walk away from correctness, just some wavering around it. And it's not like I have that many commands I need to type commonly enough to make an alias for-- maybe a couple dozen? And for most of them, I don't make typos so I don't feel the need to make an alias.

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

#48

Earlier quoted context omitted.

I like how you named and styled the command after how many terminal users actually approach these situations. 1. Hurriedly type something to solve a pressing problem. It doesn't work but tells you enough the fix should be obvious to a machine. 2. Mutter or shout "Fuck!" in head depending on how obvious problem was, how often it repeats, or just how long it takes to redo it. 3. Perform the correct action. Your model i…

Of course, the drawback is that the machine doesn't really know what you intended without more context than a single command line. Often it can make a good guess, but not always and sometimes it'll guess wrong, perhaps disastrously so.

Well, it's guessing the intent of a user on command line and trying to fix their problem automatically. I don't expect perfection so much as it working well enough in common situations.

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

#49

Earlier quoted context omitted.

I like how you named and styled the command after how many terminal users actually approach these situations. 1. Hurriedly type something to solve a pressing problem. It doesn't work but tells you enough the fix should be obvious to a machine. 2. Mutter or shout "Fuck!" in head depending on how obvious problem was, how often it repeats, or just how long it takes to redo it. 3. Perform the correct action. Your model i…

Of course, the drawback is that the machine doesn't really know what you intended without more context than a single command line. Often it can make a good guess, but not always and sometimes it'll guess wrong, perhaps disastrously so.

But it asks for confirmation and almost always suggests more than one option. Although it isn't smart enough to remember what you chose and suggest this variant in future.

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

#50
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"

if you sudo apt install sl you will have more fun making that typo ;)
Post reply on HN