Skip to content

Commit

Permalink
Merge 80d5c8a into b28ece0
Browse files Browse the repository at this point in the history
  • Loading branch information
djh82 committed Jan 6, 2020
2 parents b28ece0 + 80d5c8a commit bdb744d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions tests/shells/test_fish.py
Expand Up @@ -88,10 +88,8 @@ def test_app_alias(self, shell):
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')
settings.alter_history = False
assert 'builtin history delete' not in shell.app_alias('FUCK')
assert 'builtin history merge' not in shell.app_alias('FUCK')

def test_get_history(self, history_lines, shell):
history_lines(['- cmd: ls', ' when: 1432613911',
Expand Down
6 changes: 3 additions & 3 deletions thefuck/shells/fish.py
Expand Up @@ -51,8 +51,7 @@ def _get_overridden_aliases(self):
def app_alias(self, alias_name):
if settings.alter_history:
alter_history = (' builtin history delete --exact'
' --case-sensitive -- $fucked_up_command\n'
' builtin history merge ^ /dev/null\n')
' --case-sensitive -- $fucked_up_command\n')
else:
alter_history = ''
# It is VERY important to have the variables declared WITHIN the alias
Expand All @@ -61,7 +60,8 @@ def app_alias(self, alias_name):
' env TF_SHELL=fish TF_ALIAS={0} PYTHONIOENCODING=utf-8'
' thefuck $fucked_up_command {2} $argv | read -l unfucked_command\n'
' if [ "$unfucked_command" != "" ]\n'
' eval $unfucked_command\n{1}'
' commandline $unfucked_command\n'
' commandline -f execute\n{1}'
' end\n'
'end').format(alias_name, alter_history, ARGUMENT_PLACEHOLDER)

Expand Down

0 comments on commit bdb744d

Please sign in to comment.