From ac77f2dbb970121a7fc41a935f0c35384cfba7ac Mon Sep 17 00:00:00 2001 From: Sylvain LAFRASSE Date: Wed, 30 Mar 2022 18:11:36 +0200 Subject: [PATCH] Add documentation of verbose mode. --- man/tio.1.in | 3 +++ src/bash-completion/tio.in | 7 ++++++- src/options.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/man/tio.1.in b/man/tio.1.in index d4fb7f5..126d00d 100644 --- a/man/tio.1.in +++ b/man/tio.1.in @@ -122,7 +122,10 @@ Display program version. .BR \-h ", " \-\-help Display help. +.TP +.BR \-V ", " \-\-verbose +Display extended configuration. .SH "KEYS" .PP .TP 16n diff --git a/src/bash-completion/tio.in b/src/bash-completion/tio.in index d64d7e3..75539b8 100644 --- a/src/bash-completion/tio.in +++ b/src/bash-completion/tio.in @@ -23,7 +23,8 @@ _tio() -t --timestamp \ -L --list-devices \ -c --color \ - -h --help" + -h --help" \ + -V --verbose \ # Complete the arguments to the options. case "${prev}" in @@ -88,6 +89,10 @@ _tio() COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; + -V | --verbose) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; *) ;; esac diff --git a/src/options.c b/src/options.c index f6b86f9..f22def5 100644 --- a/src/options.c +++ b/src/options.c @@ -76,6 +76,7 @@ void print_help(char *argv[]) printf(" -c, --color Colorize tio text\n"); printf(" -v, --version Display version\n"); printf(" -h, --help Display help\n"); + printf(" -V, --verbose Display extended configuration\n"); printf("\n"); printf("See the man page for more details.\n"); printf("\n"); @@ -180,7 +181,7 @@ void options_parse(int argc, char *argv[]) {"color", required_argument, 0, 'c'}, {"version", no_argument, 0, 'v'}, {"help", no_argument, 0, 'h'}, - {"V", no_argument, 0, 'V'}, + {"verbose", no_argument, 0, 'V'}, {0, 0, 0, 0 } };