File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
33import pytest
4+ from thefuck .const import ARGUMENT_PLACEHOLDER
45from thefuck .shells import Fish
56
67
@@ -82,6 +83,7 @@ def test_app_alias(self, shell):
8283 assert 'TF_SHELL=fish' in shell .app_alias ('fuck' )
8384 assert 'TF_ALIAS=fuck PYTHONIOENCODING' in shell .app_alias ('fuck' )
8485 assert 'PYTHONIOENCODING=utf-8 thefuck' in shell .app_alias ('fuck' )
86+ assert ARGUMENT_PLACEHOLDER in shell .app_alias ('fuck' )
8587
8688 def test_app_alias_alter_history (self , settings , shell ):
8789 settings .alter_history = True
Original file line number Diff line number Diff line change 55import six
66from .. import logs
77from ..conf import settings
8+ from ..const import ARGUMENT_PLACEHOLDER
89from ..utils import DEVNULL , cache
910from .generic import Generic
1011
@@ -56,11 +57,11 @@ def app_alias(self, alias_name):
5657 return ('function {0} -d "Correct your previous console command"\n '
5758 ' set -l fucked_up_command $history[1]\n '
5859 ' env TF_SHELL=fish TF_ALIAS={0} PYTHONIOENCODING=utf-8'
59- ' thefuck $fucked_up_command | read -l unfucked_command\n '
60+ ' thefuck $fucked_up_command {2} $argv | read -l unfucked_command\n '
6061 ' if [ "$unfucked_command" != "" ]\n '
6162 ' eval $unfucked_command\n {1}'
6263 ' end\n '
63- 'end' ).format (alias_name , alter_history )
64+ 'end' ).format (alias_name , alter_history , ARGUMENT_PLACEHOLDER )
6465
6566 def get_aliases (self ):
6667 overridden = self ._get_overridden_aliases ()
You can’t perform that action at this time.
0 commit comments