1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

#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
This commit is contained in:
Pablo Santiago Blum de Aguiar 2021-07-17 14:15:51 +02:00 committed by Pablo Aguiar
parent 711feb4df5
commit 0668822abb
2 changed files with 6 additions and 3 deletions

View File

@ -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')

View File

@ -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