From 89e36975f85d1188a3c0693dc60546b2711ad7b2 Mon Sep 17 00:00:00 2001 From: Floyd Anderson Date: Fri, 27 Apr 2018 21:07:14 +0200 Subject: [PATCH] Adjust usage() string across docs for consistency --- doc/manual.xml.head | 108 ++++++++++++++++++++++---------------------- doc/neomutt.man | 93 +++++++++++++++++++------------------- main.c | 8 ++-- 3 files changed, 105 insertions(+), 104 deletions(-) diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 663f2df73..a686da1d6 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -16556,20 +16556,27 @@ folder-hook ^pop 'set read_inc=1' + + -- + + Special argument forces NeoMutt to stop option parsing and + treat remaining arguments as addresses even + if they start with a dash + + -A alias Print an expanded version of the given alias - to stdout and exit. + to stdout and exit - -a file [...] + -a file - Attach one or more files to a message. Must - be given at last and separate attachment(s) from address(es) - using the '--' - argument, e.g.: + Attach one or more files to a message (must + be the last option). Add any addresses after the + '--' argument, e.g.: neomutt -a image.jpg -- address1 @@ -16581,48 +16588,48 @@ neomutt -a image.jpg *.png -- address1 address2 -B - Run in batch mode (do not start the ncurses UI). + Run in batch mode (do not start the ncurses UI) -b address - Specify a blind carbon copy (Bcc) recipient. + Specify a blind carbon copy (Bcc) recipient -c address - Specify a carbon copy (Cc) recipient. + Specify a carbon copy (Cc) recipient -D - Dump all configuration variables as - 'name=value' pair to - stdout. + Dump all config variables as + 'name=value' pairs + to stdout -D -S Like -D, but hide the value of - sensitive variables. + sensitive variables -d level - Log debugging output to file (by default to + Log debugging output to a file (default is "~/.neomuttdebug0"). The level can range from 1–5 and - affects verbosity. A value of 2 is recommended. Using this + affects verbosity (a value of 2 is recommended). Using this option along with -l is useful to log the early startup process (before reading any configuration and hence $debug_level and - $debug_file). + $debug_file) @@ -16631,74 +16638,76 @@ neomutt -a image.jpg *.png -- address1 address2 Edit draft (-H) or include (-i) - file during message composition. + file during message composition -e command - Specify a command to be run after initial - program configuration. + Specify a command to be run after reading + the config files -F config - Specify an alternative initialization file to read. See section + Specify an alternative initialization file to read, see section Location of Initialization Files - for a list of regular configuration files. + for a list of regular configuration files -f mailbox Specify a mailbox (as defined with - mailboxes command) to load. + mailboxes command) + to load -G - Start NeoMutt with a listing of subscribed newsgroups. + Start NeoMutt with a listing of subscribed newsgroups -g server Like -G, but start at - specified news server. + specified news server -H draft Specify a draft file with header and body - for message composing. + for message composing -h - Print this help message and exit. + Print this help message and exit -i include Specify an include file to be embedded in - the body of a message. + the body of a message -l file - Specify a file for debugging output. This + Specify a file for debugging output (default + "~/.neomuttdebug0"). This overrules $debug_file - setting. NeoMutt keeps up to five debug logs ({ + setting and NeoMutt keeps up to five debug logs ({ file | $debug_file | ~/.neomuttdebug }[0-4]) - before override the oldest file. + before override the oldest file @@ -16706,73 +16715,72 @@ neomutt -a image.jpg *.png -- address1 address2 Specify a default mailbox format type for newly created folders. The type is either - MH, MMDF, Maildir or mbox (case-insensitive). + MH, MMDF, Maildir or mbox (case-insensitive) -n - Bypass loading of system-wide configuration file. + Do not read the system-wide configuration file -p - Resume a prior postponed message, if any. + Resume a prior postponed message, if any -Q variable - Query a configuration variable after all - configuration files and commands - (-e) have been processed and - print its value to stdout. + Query a configuration variable and print its + value to stdout (after the config has been read and any + commands executed) -R - Open mailbox in read-only mode. + Open mailbox in read-only mode -s subject Specify a subject (must be enclosed in - quotes if it has spaces). + quotes if it has spaces) -v - Print the NeoMutt version and compile-time definitions and exit. + Print the NeoMutt version and compile-time definitions and exit -vv - Print the NeoMutt license and copyright information and exit. + Print the NeoMutt license and copyright information and exit -x Simulate the mailx(1) send - mode. + mode -y - Start NeoMutt with a listing of all defined mailboxes. + Start NeoMutt with a listing of all defined mailboxes -Z - Open the first mailbox with new message or exit immediately with - exit code 1 if none is found in all defined mailboxes. + Open the first mailbox with new message or exit immediately + with exit code 1 if none is found in all defined mailboxes @@ -16780,15 +16788,7 @@ neomutt -a image.jpg *.png -- address1 address2 Open the first or specified (-f) mailbox if it holds any - message or exit immediately with exit code 1 otherwise. - - - - -- - - Special argument forces NeoMutt to stop option parsing and - treat remaining arguments as address even if - they start with a hyphen. + message or exit immediately with exit code 1 otherwise diff --git a/doc/neomutt.man b/doc/neomutt.man index 26eedb4a9..beea680da 100644 --- a/doc/neomutt.man +++ b/doc/neomutt.man @@ -159,13 +159,18 @@ HTML, and/or PDF format. .SH OPTIONS .\" -------------------------------------------------------------------- .TP +.BI \-\- +Special argument forces NeoMutt to stop option parsing and treat remaining +arguments as \fIaddress\fPes even if they start with a dash +. +.TP .BI \-A " alias" -Print an expanded version of the given \fIalias\fP to stdout and exit. +Print an expanded version of the given \fIalias\fP to stdout and exit . .TP -.BI \-a " file \fR[\fP.\|.\|.\&\fR]\fP" -Attach one or more \fIfile\fPs to a message. Must be given at last and separate -attachment(s) from address(es) using the \(aq\fB\-\-\fP\(aq argument, e.g.: +.BI \-a " file" +Attach one or more \fIfile\fPs to a message (must be the last option). Add any +addresses after the \(aq\fB\-\-\fP\(aq argument, e.g.: .RS .IP .EX @@ -177,141 +182,137 @@ attachment(s) from address(es) using the \(aq\fB\-\-\fP\(aq argument, e.g.: . .TP .BI \-B -Run in batch mode (do not start the ncurses UI). +Run in batch mode (do not start the ncurses UI) . .TP .BI \-b " address" -Specify a blind carbon copy (Bcc) recipient. +Specify a blind carbon copy (Bcc) recipient . .TP .BI \-c " address" -Specify a carbon copy (Cc) recipient. +Specify a carbon copy (Cc) recipient . .TP .BI \-D Dump all configuration variables as .RB \(aq name = value \(aq -pair to stdout. +pairs to stdout . .TP .BI \-D\ \-S -Like \fB\-D\fP, but hide the value of sensitive variables. +Like \fB\-D\fP, but hide the value of sensitive variables . .TP .BI \-d " level" -Log debugging output to file (by default to \(dq\fI~/.neomuttdebug0\fP\(dq). -The \fIlevel\fP can range from 1\(en5 and affects verbosity. A value of 2 is -recommended. +Log debugging output to a file (default is \(dq\fI~/.neomuttdebug0\fP\(dq). +The \fIlevel\fP can range from 1\(en5 and affects verbosity (a value of 2 is +recommended) .IP Using this option along with \fB\-l\fP is useful to log the early startup process (before reading any configuration and hence $debug_level and -$debug_file). +$debug_file) . .TP .BI \-E Edit \fIdraft\fP (\fB\-H\fP) or \fIinclude\fP (\fB\-i\fP) file during message -composition. +composition . .TP .BI \-e " command" -Specify a \fIcommand\fP to be run after initial program configuration. +Specify a \fIcommand\fP to be run after reading the config files . .TP .BI \-F " config" -Specify an alternative initialization file to read. -.IP -See \fIFILES\fP section below for a list of regular configuration files. +Specify an alternative initialization file to read, see \fIFILES\fP section +below for a list of regular configuration files . .TP .BI \-f " mailbox" -Specify a \fImailbox\fP (as defined with \fBmailboxes\fP command) to load. +Specify a \fImailbox\fP (as defined with \fBmailboxes\fP command) to load . .TP .BI \-G -Start NeoMutt with a listing of subscribed newsgroups. +Start NeoMutt with a listing of subscribed newsgroups . .TP .BI \-g " server" -Like \fB\-G\fP, but start at specified news \fIserver\fP. +Like \fB\-G\fP, but start at specified news \fIserver\fP . .TP .BI \-H " draft" -Specify a \fIdraft\fP file with header and body for message composing. +Specify a \fIdraft\fP file with header and body for message composing . .TP .BI \-h -Print this help message and exit. +Print this help message and exit . .TP .BI \-i " include" -Specify an \fIinclude\fP file to be embedded in the body of a message. +Specify an \fIinclude\fP file to be embedded in the body of a message . .TP .BI \-l " file" -Specify a \fIfile\fP for debugging output. +Specify a \fIfile\fP for debugging output (default +\(dq\fI~/.neomuttdebug0\fP\(dq) .IP -This overrules $debug_file setting. NeoMutt keeps up to five debug logs +This overrules $debug_file setting and NeoMutt keeps up to five debug logs .RI "({ " file " | $debug_file | " ~/.neomuttdebug " }[" 0 - 4 ]) -before override the oldest file. +before override the oldest file . .TP .BI \-m " type" -Specify a default mailbox format \fItype\fP for newly created folders. The -\fItype\fP is either MH, MMDF, Maildir or mbox (case-insensitive). +Specify a default mailbox format \fItype\fP for newly created folders +.IP +The \fItype\fP is either MH, MMDF, Maildir or mbox (case-insensitive) . .TP .BI \-n -Bypass loading of system-wide configuration file. +Do not read the system-wide configuration file . .TP .BI \-p -Resume a prior postponed message, if any. +Resume a prior postponed message, if any . .TP .BI \-Q " variable" -Query a configuration \fIvariable\fP after all configuration files and commands -(\fB\-e\fP) have been processed and print its value to stdout. +Query a configuration \fIvariable\fP and print its value to stdout (after the +config has been read and any commands executed) . .TP .BI \-R -Open mailbox in read-only mode. +Open mailbox in read-only mode . .TP .BI \-s " subject" -Specify a \fIsubject\fP (must be enclosed in quotes if it has spaces). +Specify a \fIsubject\fP (must be enclosed in quotes if it has spaces) . .TP .BI \-v -Print the NeoMutt version and compile-time definitions and exit. +Print the NeoMutt version and compile-time definitions and exit . .TP .BI \-vv -Print the NeoMutt license and copyright information and exit. +Print the NeoMutt license and copyright information and exit . .TP .BI \-x Simulate the .BR mailx (1) -send mode. +send mode . .TP .BI \-y -Start NeoMutt with a listing of all defined mailboxes. +Start NeoMutt with a listing of all defined mailboxes . .TP .BI \-Z Open the first mailbox with new message or exit immediately with exit code 1 if -none is found in all defined mailboxes. +none is found in all defined mailboxes . .TP .BI \-z Open the first or specified (\fB\-f\fP) mailbox if it holds any message or exit -immediately with exit code 1 otherwise. -. -.TP -.BI \-\- -Special argument forces NeoMutt to stop option parsing and treat remaining -arguments as \fIaddress\fP even if they start with a hyphen. +immediately with exit code 1 otherwise . .\" -------------------------------------------------------------------- .SH ENVIRONMENT diff --git a/main.c b/main.c index c45891d6f..35af68b01 100644 --- a/main.c +++ b/main.c @@ -117,6 +117,8 @@ static void usage(void) /* L10N: Try to limit to 80 columns If more space is needed add an indented line */ puts(_("options:\n" + " -- Special argument forces NeoMutt to stop option parsing and treat\n" + " remaining arguments as addresses even if they start with a dash\n" " -A Print an expanded version of the given alias to stdout and exit\n" " -a Attach one or more files to a message (must be the last option)\n" " Add any addresses after the '--' argument\n" @@ -136,7 +138,7 @@ static void usage(void) " -H Specify a draft file with header and body for message composing\n" " -h Print this help message and exit\n" " -i Specify an include file to be embedded in the body of a message\n" - " -l Specify a file for debugging output (default ~/.neomuttdebug0)\n" + " -l Specify a file for debugging output (default \"~/.neomuttdebug0\")\n" " -m Specify a default mailbox format type for newly created folders\n" " The type is either MH, MMDF, Maildir or mbox (case-insensitive)\n" " -n Do not read the system-wide configuration file\n" @@ -152,9 +154,7 @@ static void usage(void) " -Z Open the first mailbox with new message or exit immediately with\n" " exit code 1 if none is found in all defined mailboxes\n" " -z Open the first or specified (-f) mailbox if it holds any message\n" - " or exit immediately with exit code 1 otherwise\n" - " -- Special argument forces NeoMutt to stop option parsing and treat\n" - " remaining arguments as addresses even if they start with a dash")); + " or exit immediately with exit code 1 otherwise")); } // clang-format on -- 2.40.0