Re:The Fuck – Correct your previous console command
by hurin on Friday April 17, 2015 @02:33PM
(#9396255)
Not being 100% sure which command this will correct to is dangerous. Also the need for this is largely negated by a shell with autosuggestions.
[ Parent
| on HN ]
Re:The Fuck – Correct your previous console command
by JadeNB on Friday April 17, 2015 @02:43PM
(#9396313)
> Not being 100% sure which command this will correct to is dangerous.
And yet the concept of the invocation `fuck --dry-run` is surely unappealing. :-)
Re:The Fuck – Correct your previous console command
by sz4kerto on Friday April 17, 2015 @03:32PM
(#9396653)
I don't often laugh at HN comments, but when I do, I do it hard. :)
Re:The Fuck – Correct your previous console command
by zak_mc_kracken on Friday April 17, 2015 @04:15PM
(#9396930)
You get easily aroused.
Re:The Fuck – Correct your previous console command
by jacob9706 on Friday April 17, 2015 @05:19PM
(#9397248)
Created a pull request for a `fuck -dry` option.
Did not test nor store the command so when it is ran again it is recalled, but the base is there for it to be fully implemented.
Re:The Fuck – Correct your previous console command
by igorgue on Friday April 17, 2015 @03:44PM
(#9396741)
Okay that was hilarious!
Re:The Fuck – Correct your previous console command
by hurin on Friday April 17, 2015 @06:38PM
(#9397585)
/sigh @hackernews turning into your typical reddit thread.
Re:The Fuck – Correct your previous console command
by chaosfox on Friday April 17, 2015 @04:49PM
(#9397124)
I think dry-run should be the default.
Then if you really want to run it without checking the command first you could do:
fuck --without-condom
or maybe fuck --iamfeelinglucky
Re:The Fuck – Correct your previous console command
by fnordfnordfnord on Friday April 17, 2015 @09:23PM
(#9398014)
--bareback?
Re:The Fuck – Correct your previous console command
by jacob9706 on Friday April 17, 2015 @04:55PM
(#9397158)
Ok. The --without-condom needs to be an option.
Re:The Fuck – Correct your previous console command
by iLoch on Friday April 17, 2015 @03:27PM
(#9396622)
What if you could fuck with a small D? `fuck -d`
Re:The Fuck – Correct your previous console command
by Arcsech on Friday April 17, 2015 @03:12PM
(#9396537)
I think a good solution to this would be to have it display the command it's going to run with a y/n prompt. It would only add one extra keystroke and make the utility a lot safer. I think I'll make a pull request or fork or something that does this this weekend if somebody hasn't already by then.
Re:The Fuck – Correct your previous console command
by DougBTX on Friday April 17, 2015 @04:54PM
(#9397147)
If it defaulted to yes, then running it would be,
fuck<return><return>
which is probably good enough. (Pressing the same key twice is pretty much the same as pressing one key, but pressing two different keys is harder.)
Re:The Fuck – Correct your previous console command
by vitoreiji on Friday April 17, 2015 @06:59PM
(#9397657)
I used to alias `rm` to `rm -i`, until I realized that I just pressed <return><y><return> without thinking.
Re:The Fuck – Correct your previous console command
by giancarlostoro on Friday April 17, 2015 @03:06PM
(#9396503)
Or syntax highlighting as found in fish, red if your command will not run, blue otherwise, params in blue. Duno I wish more shells had basic syntax highlighting for input commands.
Re:The Fuck – Correct your previous console command
by kilotaras on Saturday April 18, 2015 @04:36AM
(#9398744)
Here's one for zsh
https://github.com/zsh-users/zsh-syntax-highlighting
Re:The Fuck – Correct your previous console command
by Anderkent on Friday April 17, 2015 @03:07PM
(#9396505)
I'd like it more if it just expanded to the 'correct' command and required another return to actually run:
$ apt-get install foo<return> $ fuck<return> -> sudo apt-get install foo<return>
zsh does something similar for history commands, I think:
$ echo foo foo $ echo !$<return> -> $ echo foo
Re:The Fuck – Correct your previous console command
by danso on Friday April 17, 2015 @02:47PM
(#9396340)
Yeah I agree...the appeal of CLI is to tersely do a variety of powerful commands...and the tradeoff is that you have to be exact in your syntax. The seconds saved in not having to retype something is a relatively irrelevant optimization, which isn't bad in itself except that it also introduces a significant amount of ambiguity, which can be deadly in CLI work.
Re:The Fuck – Correct your previous console command
by fnordfnordfnord on Friday April 17, 2015 @09:25PM
(#9398020)
Good point, maybe don't use this for steering satellites or weapon systems.