From 0668822abb6471c3f382ad19bb7f761ff79bea37 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Sat, 17 Jul 2021 14:15:51 +0200 Subject: [PATCH] #1215: Remove redirection to stderr with the ^ character Redirection to standard error with the `^` character is disabled by default since Fish Shell version 3.3[1]. Fix #1214 [1]: https://github.com/fish-shell/fish-shell/blob/master/CHANGELOG.rst#deprecations-and-removed-features-1 --- tests/shells/test_fish.py | 7 +++++-- thefuck/shells/fish.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/shells/test_fish.py b/tests/shells/test_fish.py index ff627a4..2384dad 100644 --- a/tests/shells/test_fish.py +++ b/tests/shells/test_fish.py @@ -87,8 +87,11 @@ class TestFish(object): def test_app_alias_alter_history(self, settings, shell): settings.alter_history = True - assert 'builtin history delete' in shell.app_alias('FUCK') - assert 'builtin history merge' in shell.app_alias('FUCK') + assert ( + 'builtin history delete --exact --case-sensitive -- $fucked_up_command\n' + in shell.app_alias('FUCK') + ) + assert 'builtin history merge\n' in shell.app_alias('FUCK') settings.alter_history = False assert 'builtin history delete' not in shell.app_alias('FUCK') assert 'builtin history merge' not in shell.app_alias('FUCK') diff --git a/thefuck/shells/fish.py b/thefuck/shells/fish.py index 5147819..eb7e915 100644 --- a/thefuck/shells/fish.py +++ b/thefuck/shells/fish.py @@ -52,7 +52,7 @@ class Fish(Generic): if settings.alter_history: alter_history = (' builtin history delete --exact' ' --case-sensitive -- $fucked_up_command\n' - ' builtin history merge ^ /dev/null\n') + ' builtin history merge\n') else: alter_history = '' # It is VERY important to have the variables declared WITHIN the alias