mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Rename --log-filename to --log-file
This commit is contained in:
parent
01a58dd319
commit
db45326d98
3 changed files with 10 additions and 6 deletions
|
|
@ -89,7 +89,7 @@ List available serial devices.
|
||||||
Enable log to file. If no filename is provided the filename will be automatically generated.
|
Enable log to file. If no filename is provided the filename will be automatically generated.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR " \-\-log-filename \fI<filename>
|
.BR " \-\-log-file \fI<filename>
|
||||||
|
|
||||||
Set log filename.
|
Set log filename.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ _tio()
|
||||||
-o --output-delay \
|
-o --output-delay \
|
||||||
-n --no-autoconnect \
|
-n --no-autoconnect \
|
||||||
-l --log \
|
-l --log \
|
||||||
--log-filename \
|
--log-file \
|
||||||
-m --map \
|
-m --map \
|
||||||
-t --timestamp \
|
-t --timestamp \
|
||||||
--timestamp-format \
|
--timestamp-format \
|
||||||
|
|
@ -68,6 +68,10 @@ _tio()
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
-l | --log-file)
|
||||||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
-m | --map)
|
-m | --map)
|
||||||
COMPREPLY=( $(compgen -W "ICRNL IGNCR INLCR INLCRNL OCRNL ODELBS ONLCRNL" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "ICRNL IGNCR INLCR INLCRNL OCRNL ODELBS ONLCRNL" -- ${cur}) )
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ enum opt_t
|
||||||
{
|
{
|
||||||
OPT_NONE,
|
OPT_NONE,
|
||||||
OPT_TIMESTAMP_FORMAT,
|
OPT_TIMESTAMP_FORMAT,
|
||||||
OPT_LOG_FILENAME,
|
OPT_LOG_FILE,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Default options */
|
/* Default options */
|
||||||
|
|
@ -81,7 +81,7 @@ void print_help(char *argv[])
|
||||||
printf(" --timestamp-format <format> Set timestamp format (default: 24hour)\n");
|
printf(" --timestamp-format <format> Set timestamp format (default: 24hour)\n");
|
||||||
printf(" -L, --list-devices List available serial devices\n");
|
printf(" -L, --list-devices List available serial devices\n");
|
||||||
printf(" -l, --log Enable log to file\n");
|
printf(" -l, --log Enable log to file\n");
|
||||||
printf(" --log-filename <filename> Set log filename\n");
|
printf(" --log-file <filename> Set log filename\n");
|
||||||
printf(" -m, --map <flags> Map special characters\n");
|
printf(" -m, --map <flags> Map special characters\n");
|
||||||
printf(" -c, --color 0..255|none|list Colorize tio text (default: 15)\n");
|
printf(" -c, --color 0..255|none|list Colorize tio text (default: 15)\n");
|
||||||
printf(" -S, --socket <socket> Listen on socket\n");
|
printf(" -S, --socket <socket> Listen on socket\n");
|
||||||
|
|
@ -191,7 +191,7 @@ void options_parse(int argc, char *argv[])
|
||||||
{"timestamp-format", required_argument, 0, OPT_TIMESTAMP_FORMAT },
|
{"timestamp-format", required_argument, 0, OPT_TIMESTAMP_FORMAT },
|
||||||
{"list-devices", no_argument, 0, 'L' },
|
{"list-devices", no_argument, 0, 'L' },
|
||||||
{"log", no_argument, 0, 'l' },
|
{"log", no_argument, 0, 'l' },
|
||||||
{"log-filename", required_argument, 0, OPT_LOG_FILENAME },
|
{"log-file", required_argument, 0, OPT_LOG_FILE },
|
||||||
{"socket", required_argument, 0, 'S' },
|
{"socket", required_argument, 0, 'S' },
|
||||||
{"map", required_argument, 0, 'm' },
|
{"map", required_argument, 0, 'm' },
|
||||||
{"color", required_argument, 0, 'c' },
|
{"color", required_argument, 0, 'c' },
|
||||||
|
|
@ -272,7 +272,7 @@ void options_parse(int argc, char *argv[])
|
||||||
option.log = true;
|
option.log = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPT_LOG_FILENAME:
|
case OPT_LOG_FILE:
|
||||||
option.log_filename = optarg;
|
option.log_filename = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue