Skip to content
Snippets Groups Projects
Commit ff9145f8 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

executable: quote arguments

This allows command line arguments with spaces to be shown. The quoting
madness is because a single quote cannot appear within a single quoted
argument on the command line. To do so, you have to stop the single
quote argument, double quote the single quote, then open the single
quote again:

    $ echo 'before'"'"'after'
    before'after

Fixes #174
parent fa02f94c
Branches
Tags
No related merge requests found
......@@ -144,7 +144,7 @@ def streamify(arg, mode):
cmd = self.exe + list(args)
cmd_line = ' '.join(cmd)
cmd_line = "'%s'" % "' '".join(map(lambda arg: arg.replace("'", "'\"'\"'"), cmd))
tty.debug(cmd_line)
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment