summaryrefslogtreecommitdiffhomepage
path: root/cli-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-10-28 21:37:35 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-10-28 21:37:35 +0800
commite4827025be46a3a257a3070dcb14265f0c40d7b9 (patch)
tree29a3c2b4409a62c39f9a907ae270167a457b6559 /cli-runopts.c
parent00798ca8ccf7d2365be11649b0c8474634c3d72e (diff)
Warn rather than fail if flags have trailing parts
Diffstat (limited to 'cli-runopts.c')
-rw-r--r--cli-runopts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli-runopts.c b/cli-runopts.c
index b251550..2b0cb7d 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -220,8 +220,9 @@ void cli_getopts(int argc, char ** argv) {
/* A flag *waves* */
char c = argv[i][1];
if (strlen(argv[i]) != 2) {
- /* Ensure only one flag per hyphen. '?' falls through to print help */
- c = '?';
+ /* We only handle one flag per hyphen */
+ fprintf(stderr, "Warning, trailing '%s' of '%s' is ignored.\n",
+ &argv[i][2], argv[i]);
}
switch (c) {
case 'y': /* always accept the remote hostkey */