Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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<n>? no 
  check aborted.


If you're less adventurous, and use fish/tmux, you could try something like:

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


Yup, is it possible to simulate the "up arrow" but fix it first before injecting it back into the input field of the terminal?


Yeah, OP here. It really almost gave me a heart attack ;)


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: