Date: Wed, 4 Nov 2015 04:15:11 -0000
Options parsing apparently requires an option to be separate from its argument;
in particular, the logic that disallows the combination of multiple options
into one option also disallows the combination of an option and its argument
into one option.

See `cli-runopts.c:cli_getopts()' for details on option parsing.
---
 scp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scp.c b/scp.c
index 53789bf..bb19c8b 100644
--- a/scp.c
+++ b/scp.c
@@ -175,8 +175,10 @@ static void
 arg_setup(char *host, char *remuser, char *cmd)
 {
        replacearg(&args, 0, "%s", ssh_program);
-       if (remuser != NULL)
-               addargs(&args, "-l%s", remuser);
+       if (remuser != NULL) {
+               addargs(&args, "-l");
+               addargs(&args, "%s", remuser);
+       }
        addargs(&args, "%s", host);
        addargs(&args, "%s", cmd);
 }
-- 
2.4.3

Reply via email to