mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Improve help and man page
This commit is contained in:
parent
c94e8826fd
commit
5b6a106b34
2 changed files with 11 additions and 10 deletions
16
man/tio.1.in
16
man/tio.1.in
|
|
@ -6,13 +6,13 @@ tio \- a simple serial terminal I/O tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.PP
|
.PP
|
||||||
.B tio
|
.B tio
|
||||||
.RI "[" <options> "] " "<tty-device>"
|
.RI "[" <options> "] " "<tty-device/config>"
|
||||||
|
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
.B tio
|
.B tio
|
||||||
is a simple serial terminal tool which features a straightforward command-line
|
is a simple serial terminal tool which features a straightforward command-line
|
||||||
interface to easily connect to serial/TTY devices for basic I/O operations.
|
interface to easily connect to serial TTY devices for basic I/O operations.
|
||||||
|
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
|
|
||||||
|
|
@ -176,14 +176,14 @@ Show version
|
||||||
Options can be set via a 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 a 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
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
Sections can be used to group settings.
|
Config sections can be used to group settings.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.TP
|
.TP
|
||||||
tio will try to match the user input to a section by name or by pattern to get the tty and other options.
|
tio will try to match the user input to a config section by name or by pattern to get the tty and other options.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
Options without any section name sets the default options.
|
Options without any config section name sets the default options.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
The following configuration file options are available:
|
The following configuration file options are available:
|
||||||
|
|
@ -225,7 +225,7 @@ Set socket path (must include
|
||||||
.SH "CONFIGURATION EXAMPLES"
|
.SH "CONFIGURATION EXAMPLES"
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
A typical section used as a short-hand would be defined as such:
|
A typical config section used as a short-hand would be defined as such:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
|
|
@ -239,14 +239,14 @@ color=11
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
With this section defined in the configuration file the following commands would be equivalent:
|
With this config section defined in the configuration file the following commands would be equivalent:
|
||||||
|
|
||||||
tio ftdi
|
tio ftdi
|
||||||
|
|
||||||
tio -b 115200 /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0
|
tio -b 115200 /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
A section can also be matched by its pattern which supports regular expressions:
|
A config section can also be matched by its pattern which supports regular expressions:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ struct option_t option =
|
||||||
|
|
||||||
void print_help(char *argv[])
|
void print_help(char *argv[])
|
||||||
{
|
{
|
||||||
printf("Usage: %s [<options>] <tty-device>\n", argv[0]);
|
printf("Usage: %s [<options>] <tty-device/config>\n", argv[0]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Options:\n");
|
printf("Options:\n");
|
||||||
printf(" -b, --baudrate <bps> Baud rate (default: 115200)\n");
|
printf(" -b, --baudrate <bps> Baud rate (default: 115200)\n");
|
||||||
|
|
@ -159,7 +159,8 @@ void options_parse(int argc, char *argv[])
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
print_help(argv);
|
printf("Please provide tty device or name of configuration to use\n\n");
|
||||||
|
printf("See %s --help for more details\n\n", *argv);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue