Live data from Hacker News

The Fuck – An app which corrects your previous console command

github.com

61–70 of 112 posts

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

#61
post #19
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 feel like they missed an opportunity to use 'fuck yeah' as the automatic override.

    alias just=sudo
    just fuck -me -up

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

#63

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

Besides this, I feel quite reliant on Ubuntu's "you don't have $CMD, but you would if you installed $PKG" suggestions (https://launchpad.net/ubuntu/+source/command-not-found).

A real autocorrect should probably know about all the systems I use, instead of just the one I'm actively using, and help me translate commands from syntax I "expect" to syntax that works for that system. (e.g. translating my zsh pipelines to bash pipelines; suggestion combinations of commands that can substitute for missing builtins; translating between old GNU tar/ps syntax and old BSD tar/ps syntax...)

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

#64

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

> git stauts

I added that as an alias in my git config. Even though I usually just type git st (another alias I added), sometimes my fingers type all the letters out and still fuck it up.

Of course, as I'm sure many of you do, too, I've also got a bunch of even shorter bash aliases like gpp (git pull --rebase && git push)

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

#65

Love it, have thought about it, but my one concern always is that it'll lead to a decrease in my typing skills instead of reinforcing good keying. But fuck, I just need to get stuff done sometimes.

Personally my typo rate has held pretty steady over the last decade, I don't think something like this would have any measurable effect on how well one types.

My concern would be that the extra keystroke to confirm would ingrain the skip confirm (fuck -y, or even just hitting enter before I'm prompted again) into my muscle memory, with potentially disastrous consequences (hence I've never installed this tool).

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

#66

Is this any easier though than the using the carat style previous command substitution? ^bar^baz Although I think the name might be more descriptive.

I don't understand how you think anything is easier than typing 'fuck' and have it identify and correct your mistake for you?

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

#67
post #43

Earlier quoted context omitted.

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? :)

Oh dear. That reminds me of a story I saw here on HN at some point (might have been in the comments) about a dev team that didn't insist on any commit messages in their VCS, so everyone just put in a '.' to meet the requirement that a commit had to have a message for whatever source control system they were using.

My team doesn't have a strict commit message style guide, but good god it better be at least mildly descriptive of what's in the commit.

(I know you're joking, the thought of a 3 character alias to commit with a dummy message just sent shivers down my spine :)

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

#68

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 Git Goodies, great list of aliases - https://github.com/qw3rtman/gg

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

#70
post #56

Earlier quoted context omitted.

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)

Of course to each his own, but honestly, nothing I work on involves Ghostscript (or Postscript tbh) so not too much of a concern to me.

It's just so much quicker to recall stuff: [g]it [s]tatus :)

Post reply on HN