Only add to server_args unconditionally if two non-option args have been seen

This commit is contained in:
Kovid Goyal
2018-06-01 22:55:13 +05:30
parent d319180e88
commit 06237b85f5

View File

@@ -49,10 +49,10 @@ def parse_ssh_args(args):
expecting_option_val = False
passthrough = False
for arg in args:
if server_args:
if len(server_args) > 1:
server_args.append(arg)
continue
if arg.startswith('-'):
if arg.startswith('-') and not expecting_option_val:
all_args = arg[1:]
for i, arg in enumerate(all_args):
arg = '-' + arg