Add documentation of verbose mode.

This commit is contained in:
Sylvain LAFRASSE 2022-03-30 18:11:36 +02:00
parent a543fbd7ef
commit ac77f2dbb9
3 changed files with 11 additions and 2 deletions

View file

@ -122,7 +122,10 @@ Display program version.
.BR \-h ", " \-\-help .BR \-h ", " \-\-help
Display help. Display help.
.TP
.BR \-V ", " \-\-verbose
Display extended configuration.
.SH "KEYS" .SH "KEYS"
.PP .PP
.TP 16n .TP 16n

View file

@ -23,7 +23,8 @@ _tio()
-t --timestamp \ -t --timestamp \
-L --list-devices \ -L --list-devices \
-c --color \ -c --color \
-h --help" -h --help" \
-V --verbose \
# Complete the arguments to the options. # Complete the arguments to the options.
case "${prev}" in case "${prev}" in
@ -88,6 +89,10 @@ _tio()
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0 return 0
;; ;;
-V | --verbose)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
*) *)
;; ;;
esac esac

View file

@ -76,6 +76,7 @@ void print_help(char *argv[])
printf(" -c, --color <code> Colorize tio text\n"); printf(" -c, --color <code> Colorize tio text\n");
printf(" -v, --version Display version\n"); printf(" -v, --version Display version\n");
printf(" -h, --help Display help\n"); printf(" -h, --help Display help\n");
printf(" -V, --verbose Display extended configuration\n");
printf("\n"); printf("\n");
printf("See the man page for more details.\n"); printf("See the man page for more details.\n");
printf("\n"); printf("\n");
@ -180,7 +181,7 @@ void options_parse(int argc, char *argv[])
{"color", required_argument, 0, 'c'}, {"color", required_argument, 0, 'c'},
{"version", no_argument, 0, 'v'}, {"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'}, {"help", no_argument, 0, 'h'},
{"V", no_argument, 0, 'V'}, {"verbose", no_argument, 0, 'V'},
{0, 0, 0, 0 } {0, 0, 0, 0 }
}; };