Live data from Hacker News

The Fuck – An app which corrects your previous console command

github.com

71–80 of 112 posts

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

#71

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 have a similar set, plus

alias goto='git checkout'

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

#72
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

Wouldn't those be deciseconds? Also wtf unit. Use Millis or seconds as a float. Yay Linus making sure that git only makes sense to wizards like him.

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

#74
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?

More or less helping move from 'direct manipulation' to delegation. It's not so much that this is moving away from any particular Mac principle so much as towards the sort of system outlined in that essay.

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

#75
post #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?

Lets see in order to use "fuck" I need to first install it and its dependencies. The caret substitution natively exists in the Bash shell.

Also I know that no matter what system I am on be it OS X or Linux the caret syntax is guaranteed to work.

I don't understand how you think anything can be easier than using the functionality that has existed in the Bash shell shell(or even C shell variants)since forever.

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

#76
post #54
post #40

Earlier quoted context omitted.

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.

I was worried I was the only one!

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

#77
post #2

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

It's an interesting proposition. A highly abstracted, very high level, very modal multi-user system where users actually interact instead of being sandboxed.

Keep in mind that "anti-X" stuff tends to resemble the original "X", thus despite the antagonistic name, this is probably not as revolutionary as we will get.

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

#78
post #66

Earlier quoted context omitted.

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

Lets see in order to use "fuck" I need to first install it and its dependencies. The caret substitution natively exists in the Bash shell. Also I know that no matter what system I am on be it OS X or Linux the caret syntax is guaranteed to work. I don't understand how you think anything can be easier than using the functionality that has existed in the Bash shell shell(or even C shell variants)since forever.

If that were how things worked, we'd never use any new technology. Obviously it is easier to pay a one-time up-front cost than to slog away inefficiently forever.

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

#79

I use this regularly, for everything ranging from the forgotten sudo (instead of running "sudo !!") to typos across the board. But it does get me into interesting situations! Just the other day I was demo-ing something to my team + Director of Engg on the projector, and I ran an incorrect command, followed by "fuck" to fix it, leading to so many stares :P Just as an FYI, you can change the prompt from fuck to somethi…

funny!, next time i am demoing, i will try to do it, to show off obviously

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

#80

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 agree, but I am just too lazy for that. Mine are all one char:

  alias b='/usr/local/bin/git checkout -b'
  alias a='/usr/local/bin/git add
  alias d='/usr/local/bin/git diff HEAD'
  alias c='git commit -m'
  alias i='/usr/local/bin/git pull origin'
  alias o='/usr/local/bin/git branch -avv | grep "\*" | cut -d\ -f 2 | xargs -n 1 /usr/local/bin/git push -u origin'
plus:

  alias g='/usr/local/bin/git log --graph --oneline --decorate 
  alias v='/usr/local/bin/git branch -avv'--all'
  alias h='/usr/local/bin/git log -p'
can be useful.
Post reply on HN