From 4ca7375cacecb5795448b6739c57fe012764ff63 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sun, 3 Jul 2022 13:18:52 +0200 Subject: [PATCH] Update doc --- README.md | 4 ++-- man/tio.1.in | 16 +++++++++++----- src/options.c | 4 +++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d78a3ee..0cff2bd 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ when used in combination with [tmux](https://tmux.github.io). * Log to file * Autogeneration of log filename * Configuration file support - * Select subconfigurations by name or pattern + * Select sub-configurations by name or pattern * Redirect I/O to socket for scripting or TTY sharing * Pipe input and/or output * Bash completion @@ -54,7 +54,7 @@ when used in combination with [tmux](https://tmux.github.io). The command-line interface is straightforward as reflected in the output from 'tio --help': ``` - Usage: tio [] + Usage: tio [] Options: -b, --baudrate Baud rate (default: 115200) diff --git a/man/tio.1.in b/man/tio.1.in index c25de10..b82f6b8 100644 --- a/man/tio.1.in +++ b/man/tio.1.in @@ -207,10 +207,16 @@ In hexadecimal mode each incoming byte is printed out as a hexadecimal value. .TP Bytes can be sent in this mode by typing the \fBtwo-character hexadecimal\fR representation of the value, e.g.: to send \fI0xA\fR you must type \fI0a\fR or \fI0A\fR. -.SH "CONFIGURATION" +.SH "CONFIGURATION FILE" .PP .TP 16n -Options can be set via configuration file using the INI format. tio uses the configuration file first found in the following locations in the order listed: $XDG_CONFIG_HOME/tio/tiorc, $HOME/.config/tio/tiorc, $HOME/.tiorc +Options can be set via configuration file using the INI format. tio uses the configuration file first found in the following locations in the order listed: +.PP +.I $XDG_CONFIG_HOME/tio/tiorc +.PP +.I $HOME/.config/tio/tiorc +.PP +.I $HOME/.tiorc .TP Labels can be used to group settings into named sub-configurations which can be activated from the command-line when starting tio. @@ -220,7 +226,7 @@ Labels can be used to group settings into named sub-configurations which can be tio will try to match the user input to a sub-configuration by name or by pattern to get the tty and other options. .TP -Options without any label changes the default options. +Options without any label change the default options. .TP The following configuration file options are available: @@ -265,7 +271,7 @@ Enable hexadecimal mode .IP "\fBsocket" Set socket to redirect I/O to -.SH "CONFIGURATION EXAMPLES" +.SH "CONFIGURATION FILE EXAMPLES" .TP To change the default configuration simply set options like so: @@ -308,7 +314,7 @@ Which is equivalent to: $ tio -b 115200 -c 11 /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0 .TP -A sub-configuration can also be matched by its pattern which supports regular expressions: +A sub-configuration can also be activated by its pattern which supports regular expressions: .RS .nf diff --git a/src/options.c b/src/options.c index 578bad1..2f2c812 100644 --- a/src/options.c +++ b/src/options.c @@ -68,7 +68,9 @@ struct option_t option = void print_help(char *argv[]) { - printf("Usage: %s [] \n", argv[0]); + printf("Usage: %s [] \n", argv[0]); + printf("\n"); + printf("Connect to tty-device or activate sub-configuration.\n"); printf("\n"); printf("Options:\n"); printf(" -b, --baudrate Baud rate (default: 115200)\n");