Live data from Hacker News

The Fuck – Correct your previous console command

github.com

161–170 of 173 posts

Re: The Fuck – Correct your previous console command

#161

Cool idea. For those systems where you don't have the option of adding a 3rd party tool, it's probably worth knowing some of the standard bash shortcuts. The easy to remember ones are: !^ - the first argument from the previous command !$ - the last argument from the previous command !* - all of the arguments from the previous command !! - the entire previous command For example: $ apt-get install foo # Crap $ sudo !!

Nice. Now that we're getting all stackoverflowy in here, it would be worth mentioning two other handy tips. Preventing typo mistakes with bash autocomplete is even better than correcting mistakes afterwards, it also makes typing so much faster. It works with commands AND it also works for files inside the current working directory. Hint: start typing your command and then hit TAB, voilà! Note: if there are more than…

When I was typing the '#' I was thinking 'comment', not 'root shell'; in retrospect I can see how it might have been confusing, especially when my example used 'sudo'.

Re: The Fuck – Correct your previous console command

#162

Cool idea. For those systems where you don't have the option of adding a 3rd party tool, it's probably worth knowing some of the standard bash shortcuts. The easy to remember ones are: !^ - the first argument from the previous command !$ - the last argument from the previous command !* - all of the arguments from the previous command !! - the entire previous command For example: $ apt-get install foo # Crap $ sudo !!

I always read `sudo !!` as `suddoooooooooooooooooo... aaargghhh!!!`

Re: The Fuck – Correct your previous console command

#164

Earlier quoted context omitted.

Nice. Now that we're getting all stackoverflowy in here, it would be worth mentioning two other handy tips. Preventing typo mistakes with bash autocomplete is even better than correcting mistakes afterwards, it also makes typing so much faster. It works with commands AND it also works for files inside the current working directory. Hint: start typing your command and then hit TAB, voilà! Note: if there are more than…

When I was typing the '#' I was thinking 'comment', not 'root shell'; in retrospect I can see how it might have been confusing, especially when my example used 'sudo'.

I was not criticizing your use of # at all. Using # to comment is perfectly fine I guess. Now that you mentioned it, it might be a bit confusing for newbies, but don't worry I don't think anyone would try to send the command 'Crap' over a super user session, although why the hell not? haha

Re: The Fuck – Correct your previous console command

#165

Earlier quoted context omitted.

sudo !! is my favorite thing. I named my cat sudo bangbang.

I don't see the advantage over pressing up, C-a and typing sudo

Historically: it predates the ability to do interactive line-editing.

Re: The Fuck – Correct your previous console command

#166

An issue that popped up for a user, kind of funny: https://github.com/nvbn/thefuck/issues/1 who@where:~$ fuck No fuck given who@where:~$ fuck fsck from util-linux 2.20.1 e2fsck 1.42.9 (4-Feb-2014) /dev/sda6 is mounted. WARNING!!! The filesystem is mounted. If you continue you ***WILL*** cause ***SEVERE*** filesystem damage. Do you really want to continue ? no check aborted.

In other words: don't go fuck yourself! ;)

Re: The Fuck – Correct your previous console command

#167

Cool idea. For those systems where you don't have the option of adding a 3rd party tool, it's probably worth knowing some of the standard bash shortcuts. The easy to remember ones are: !^ - the first argument from the previous command !$ - the last argument from the previous command !* - all of the arguments from the previous command !! - the entire previous command For example: $ apt-get install foo # Crap $ sudo !!

alt-. (Alt-period) is a good shortcut to keep in mind. On first press, it inputs the last arg from the previous command. If you press alt-. again, it inputs the last arg from the previous-to-previous command. And so on.

Re: The Fuck – Correct your previous console command

#168
post #87

Earlier quoted context omitted.

American prudishness. There's nothing immature in swearing in and of itself.

> American prudishness Sounds like you need a review of: https://news.ycombinator.com/newsguidelines.html Or perhaps just some common decency ? If you want a tool / platform to take off, using the word 'fuck' is not the way to go.

Swear words don't break the HN guidelines. When we ask for civility we have in mind how people treat one another online. Swear words can be used to treat others badly, but they have plenty of other uses.

It's not a trivial question, though, and people aren't wrong to disagree. Cultural differences make for very different views here. In some (sub-)cultures swear words are uncivil and in others they are innocuous. There's no model that satisfies all these norms, so inevitably we have to disappoint some.

As a consequence of the above, we don't bowdlerize titles either.

Re: The Fuck – Correct your previous console command

#169

I'm going to go out on a limb here and suggest that you rename it "The Fix." Then you could type "fixit" or just "fix".

Guys, we've spotted the Mormon here... he was this close to pooh-poohing that article about the positive productivity effects of coffee, but a curse word used in an extremely minimalist command-line tool has gone too far !

> Guys, we've spotted the Mormon here

This was probably more of a misfired joke than anything ill-intentioned, but still, not ok to post here.

Re: The Fuck – Correct your previous console command

#170
post #169

Earlier quoted context omitted.

Guys, we've spotted the Mormon here... he was this close to pooh-poohing that article about the positive productivity effects of coffee, but a curse word used in an extremely minimalist command-line tool has gone too far !

> Guys, we've spotted the Mormon here This was probably more of a misfired joke than anything ill-intentioned, but still, not ok to post here.

Dang you are the best moderator I have seen. period. Thanks man.
Post reply on HN