Earlier quoted context omitted.
I'm not sure what difference you think gender makes, unless you think women are delicate flowers that must be sheltered from bad language, but I do agree that it would be better named something more office friendly. I'd suggest 'argh', 'grr' or 'gah'.
Profanity is (deliberately) uncomfortable to people who are not part of your in-group. Women are more likely to be/feel excluded from in-groups in technology workplaces.
The Fuck – Correct your previous console command
111–120 of 173 posts
Re: The Fuck – Correct your previous console command
#112I will not let my coworkers see me typing expletives into terminal; much less if it is a woman. It is a nice idea, though. Will use it if it's called auto-correct or something.
Re: The Fuck – Correct your previous console command
#113Cool 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've been using "sudo !!" (which I pronounce as sudo bangbang in my head) for a while now, mostly with vim for editing stuff in /etc. It's very nifty. Another nifty tool is vi editing mode. You run "set -o vi", and now your shell takes vi modal editing commands. That along with Ctrl-r for reverse history search has made life in the shell so much easier. Bash has a ton of little stuff like that built in. Zsh has a few…
:w !sudo tee %
If you neglected to sudo before making your changes.Re: The Fuck – Correct your previous console command
#114What I really want is a wrapper for sudo. Whenever I use sudo, if type the password correctly it works instantly; if I mistype the password, it delays for 2 seconds before asking again. Often it's faster to Ctrl+C UP ENTER than to wait for that annoying 2 seconds. So it would be nice if a wrapper existed to see if sudo gives access within 0.1 seconds, and if it doesn't, assume the password was wrong, kill the sudo pr…
If you care about that protection, then you don't want to circumvent it, but in the equally reasonable case where you don't care, then you can probably just make sudo faster.
Re: The Fuck – Correct your previous console command
#115What I really want is a wrapper for sudo. Whenever I use sudo, if type the password correctly it works instantly; if I mistype the password, it delays for 2 seconds before asking again. Often it's faster to Ctrl+C UP ENTER than to wait for that annoying 2 seconds. So it would be nice if a wrapper existed to see if sudo gives access within 0.1 seconds, and if it doesn't, assume the password was wrong, kill the sudo pr…
I suspect the delay in sudo is configurable: it's not there because sudo is actually doing any work checking your password, it's there to prevent attackers from trying many many combinations of passwords quickly. If you care about that protection, then you don't want to circumvent it, but in the equally reasonable case where you don't care, then you can probably just make sudo faster.
Re: The Fuck – Correct your previous console command
#116Earlier quoted context omitted.
Yes, using the word "fuck" for this just strikes me as a bit immature.
You must not really be a programmer ;) Late night, vision is starting to blur and you've typed `git push origin master` incorrectly dozens of times already... $ FUCK!!!111ksjdkjsd
Re: The Fuck – Correct your previous console command
#117Earlier quoted context omitted.
Profanity is (deliberately) uncomfortable to people who are not part of your in-group. Women are more likely to be/feel excluded from in-groups in technology workplaces.
Profanity is a wonderful spice of life, it is deliberately uncomfortable to people who take things way too seriously.
Re: The Fuck – Correct your previous console command
#118Earlier quoted context omitted.
Profanity is a wonderful spice of life, it is deliberately uncomfortable to people who take things way too seriously.
Get back to me after someone you don't like or don't trust throws you some of that spice.
Re: The Fuck – Correct your previous console command
#119An 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.
# config.fish
function fuck
thefuck (history | head -n1) | tmux load-buffer -
tmux paste-buffer -s \0
end
This will paste the command The Fuck suggests without a return so you can audit the corrected command before running it.Re: The Fuck – Correct your previous console command
#120Cool 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 !!
$ ls -l /tmp/foo
ls: cannot access /tmp/foo: No such file or directory
$ !:s/foo/bar
-rw-rw-r-- 1 user user 0 Apr 17 19:12 /tmp/bar