Change skipinit so skip-init for consistency

And now ignores the skip-init on the non-interactive rigctl
pull/1662/head
Michael Black W9MDB 2024-12-25 16:36:37 -06:00
rodzic 9ac7f92d1e
commit 8edf99fc18
3 zmienionych plików z 14 dodań i 4 usunięć

Wyświetl plik

@ -334,7 +334,7 @@ and exit.
Sets the cookie to be used for remote access security
.
.TP
.BR \-# ", " \-\-skipinit
.BR \-# ", " \-\-skip_init
Skips most startup intialization. This is now automatically done when any commands are on the line.
.
.TP

Wyświetl plik

@ -110,7 +110,7 @@ static struct option long_options[] =
{"help", 0, 0, 'h'},
{"version", 0, 0, 'V'},
{"cookie", 0, 0, '!'},
{"skipinit", 0, 0, '#'},
{"skip-init", 0, 0, '#'},
{0, 0, 0, 0}
};
@ -956,7 +956,7 @@ void usage(void)
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
" -!, --cookie use cookie control\n"
" -#, --skipinit skips rig initialization\n\n"
" -#, --skip-init skips rig initialization\n\n"
);
usage_rig(stdout);

Wyświetl plik

@ -915,11 +915,21 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
}
}
if (strcmp(command,"skip-init")==0)
{
// no-op now since it's automatic in non-interactive mode
return(RIG_OK);
}
cmd_entry = find_cmd_entry(cmd);
if (!cmd_entry)
{
if (cmd != ' ')
if (cmd == 0)
{
fprintf(stderr, "Command '%s' not found!\n", command);
}
else if (cmd != ' ')
{
fprintf(stderr, "Command '%c' not found!\n", cmd);
}