mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Merge pull request #200 from weskoerber/fix/log-append-cli
fix: support --log-append in cli options
This commit is contained in:
commit
a486ba581b
5 changed files with 16 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ The command-line interface is straightforward as reflected in the output from
|
|||
-L, --list-devices List available serial devices
|
||||
-l, --log Enable log to file
|
||||
--log-file <filename> Set log filename
|
||||
--log-append Append to log file
|
||||
--log-strip Strip control characters and escape sequences
|
||||
-m, --map <flags> Map characters
|
||||
-c, --color 0..255|bold|none|list Colorize tio text (default: bold)
|
||||
|
|
|
|||
|
|
@ -390,6 +390,8 @@ Disable automatic connect
|
|||
Enable log to file
|
||||
.IP "\fBlog-file"
|
||||
Set log filename
|
||||
.IP "\fBlog-append"
|
||||
Append to log file
|
||||
.IP "\fBlog-strip"
|
||||
Enable strip of control and escape sequences from log
|
||||
.IP "\fBlocal-echo"
|
||||
|
|
|
|||
|
|
@ -305,6 +305,8 @@ CONFIGURATION FILE
|
|||
|
||||
log-file Set log filename
|
||||
|
||||
log-append Append to log file
|
||||
|
||||
log-strip Enable strip of control and escape sequences from log
|
||||
|
||||
local-echo Enable local echo
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ _tio()
|
|||
-e --local-echo \
|
||||
-l --log \
|
||||
--log-file \
|
||||
--log-append \
|
||||
--log-strip \
|
||||
-m --map \
|
||||
-t --timestamp \
|
||||
|
|
@ -90,6 +91,10 @@ _tio()
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--log-append)
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
--log-strip)
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ enum opt_t
|
|||
OPT_TIMESTAMP_FORMAT,
|
||||
OPT_LOG_FILE,
|
||||
OPT_LOG_STRIP,
|
||||
OPT_LOG_APPEND,
|
||||
OPT_LINE_PULSE_DURATION,
|
||||
OPT_RESPONSE_TIMEOUT,
|
||||
OPT_RS485,
|
||||
|
|
@ -253,6 +254,7 @@ void options_parse(int argc, char *argv[])
|
|||
{"list-devices", no_argument, 0, 'L' },
|
||||
{"log", no_argument, 0, 'l' },
|
||||
{"log-file", required_argument, 0, OPT_LOG_FILE },
|
||||
{"log-append", no_argument, 0, OPT_LOG_APPEND },
|
||||
{"log-strip", no_argument, 0, OPT_LOG_STRIP },
|
||||
{"socket", required_argument, 0, 'S' },
|
||||
{"map", required_argument, 0, 'm' },
|
||||
|
|
@ -357,6 +359,10 @@ void options_parse(int argc, char *argv[])
|
|||
option.log_strip = true;
|
||||
break;
|
||||
|
||||
case OPT_LOG_APPEND:
|
||||
option.log_append = true;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
option.socket = optarg;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue