Add shells.quote

This commit is contained in:
mcarton
2015-10-28 14:16:01 +01:00
parent dae58211ba
commit ecfc180280
4 changed files with 20 additions and 11 deletions
+3 -4
View File
@@ -1,8 +1,7 @@
import re
from shlex import split
from decorator import decorator
from ..types import Command
from ..utils import quote, is_app
from ..utils import is_app
from ..shells import quote, split_command
@decorator
@@ -24,7 +23,7 @@ def git_support(fn, command):
# 'commit' '--amend'
# which is surprising and does not allow to easily test for
# eg. 'git commit'
expansion = ' '.join(map(quote, split(search.group(2))))
expansion = ' '.join(map(quote, split_command(search.group(2))))
new_script = command.script.replace(alias, expansion)
command = command.update(script=new_script)