From e8883429c6456e8f398f359f49d349e6e4352247 Mon Sep 17 00:00:00 2001 From: jab Date: Fri, 2 Oct 2015 10:09:19 -0400 Subject: [PATCH 1/2] rm -f $eval_script Without this change, users who have "rm" aliased to "rm -i" have to confirm removal of the file after running fuck. This change allows such users to run fuck without having to do the superfluous rm confirmation. --- thefuck/shells.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/shells.py b/thefuck/shells.py index 9634f1d7..4684578b 100644 --- a/thefuck/shells.py +++ b/thefuck/shells.py @@ -134,7 +134,7 @@ class Fish(Generic): " set -l fucked_up_command $history[1]\n" " thefuck $fucked_up_command > $eval_script\n" " . $eval_script\n" - " rm $eval_script\n" + " rm -f $eval_script\n" " if test $exit_code -ne 0\n" " history --delete $fucked_up_command\n" " end\n" From 09d9f63c98f9c4fc0953dd3fd6fb4589e9e1f6f3 Mon Sep 17 00:00:00 2001 From: jab Date: Fri, 2 Oct 2015 10:12:50 -0400 Subject: [PATCH 2/2] use /bin/rm rather than rm -f --- thefuck/shells.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/shells.py b/thefuck/shells.py index 4684578b..97d51a43 100644 --- a/thefuck/shells.py +++ b/thefuck/shells.py @@ -134,7 +134,7 @@ class Fish(Generic): " set -l fucked_up_command $history[1]\n" " thefuck $fucked_up_command > $eval_script\n" " . $eval_script\n" - " rm -f $eval_script\n" + " /bin/rm $eval_script\n" " if test $exit_code -ne 0\n" " history --delete $fucked_up_command\n" " end\n"