From: Mark Wooding Date: Mon, 8 Jul 2024 02:24:02 +0000 (+0100) Subject: tmpdir.c, tmpdir.1: Add a `--quiet' option. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/checkpath/commitdiff_plain/2842188e3f68b353d62ce5504b7faeb593682a37?ds=inline tmpdir.c, tmpdir.1: Add a `--quiet' option. Not super helpful, because `tmpdir' starts out at verbosity zero, but an aesthetic improvement. --- diff --git a/tmpdir.1 b/tmpdir.1 index a1a1700..be786bd 100644 --- a/tmpdir.1 +++ b/tmpdir.1 @@ -4,7 +4,7 @@ tmpdir \- choose, or check a choice of, temporary directory .SH SYNOPSIS .B tmpdir -.RB [ \-bcv ] +.RB [ \-bcqv ] .RB [ \-C .IR dir ] .RB [ \-g @@ -84,6 +84,11 @@ Trust (the members of) .IR group : consider directories they can write to be safe. .TP +.B "\-q, \-\-quiet" +Be less verbose; cancel out a +.B \-v +option. +.TP .B "-v, \-\-verbose" Report problems to standard error. Repeat for more verbosity. .SH BUGS diff --git a/tmpdir.c b/tmpdir.c index 574e16f..944cc18 100644 --- a/tmpdir.c +++ b/tmpdir.c @@ -344,6 +344,7 @@ int main(int argc, char *argv[]) { "bourne", 0, 0, 'b' }, { "cshell", 0, 0, 'c' }, { "group", OPTF_ARGREQ, 0, 'g' }, + { "quiet", 0, 0, 'q' }, { "verbose", 0, 0, 'v' }, { 0, 0, 0, 0 } }; @@ -373,6 +374,10 @@ int main(int argc, char *argv[]) case 'g': allowgroup(&cp, optarg); break; + case 'q': + if (cp.cp_verbose) + cp.cp_verbose--; + break; case 'v': cp.cp_verbose++; break;