42static void print_header(
const char *section,
const char *desc,
bool use_color)
45 printf(
"\033[1;4m%s\033[0m: %s\n", section, desc);
47 printf(
"%s: %s\n", section, desc);
60 printf(
"%s ",
_(
"NeoMutt has four modes of operation:"));
62 puts(
"\033[1;4mhelp\033[0m, \033[1;4minfo\033[0m, \033[1;4msend\033[0m, \033[1;4mtui\033[0m");
64 puts(
"help, info, send, tui");
66 puts(
_(
"The default mode, if no command line arguments are specified, is tui."));
70 print_header(
"shared",
_(
"Options that apply to all modes"), use_color);
71 puts(
_(
"neomutt -n, --no-system-config Don't read system config file"));
72 puts(
_(
" -F, --config <file> Use this user config file"));
73 puts(
_(
" -e, --command <command> Run extra commands"));
74 puts(
_(
" -m, --mbox-type <type> Set default mailbox type"));
75 puts(
_(
" -d, --debug-level <level> Set logging level (1..5)"));
76 puts(
_(
" -l, --debug-file <file> Set logging file"));
79 print_header(
"help",
_(
"Get command line help for NeoMutt"), use_color);
80 puts(
_(
"neomutt -h, --help <mode> Detailed help for a mode"));
81 puts(
_(
" -v, --version Version"));
82 puts(
_(
" -vv, --license License"));
85 print_header(
"info",
_(
"Ask NeoMutt for config information"), use_color);
86 puts(
_(
"neomutt -A, --alias <alias> [...] Lookup email aliases"));
87 puts(
_(
" -D, --dump-config [-O] [-S] Dump the config"));
88 puts(
_(
" -DD, --dump-changed-config [-O] [-S] Dump the changed config options"));
89 puts(
_(
" -Q, --query <option> [...] [-O] [-S] Query config options"));
90 puts(
_(
" -O, --with-docs Add one-liner documentation"));
91 puts(
_(
" -S, --hide-sensitive Hide sensitive option values"));
94 print_header(
"send",
_(
"Send an email from the command line"), use_color);
95 puts(
_(
"neomutt -a, --attach <file> [...] Attach files"));
96 puts(
_(
" -b, --bcc <address> Add Bcc: address"));
97 puts(
_(
" -C, --crypto Use crypto (signing/encryption)"));
98 puts(
_(
" -c, --cc <address> Add Cc: address"));
99 puts(
_(
" -E, --edit-message Edit message (draft/include)"));
100 puts(
_(
" -H, --draft <file> Use draft email file"));
101 puts(
_(
" -i, --include <file> Include body file"));
102 puts(
_(
" -s, --subject <subject> Set Subject:"));
103 puts(
_(
" -- <address> [...] Add To: addresses"));
106 print_header(
"tui",
_(
"Start NeoMutt's TUI (Terminal User Interface)"), use_color);
107 puts(
_(
"neomutt Start NeoMutt's TUI"));
108 puts(
_(
" -f, --folder <mailbox> Open this mailbox"));
109 puts(
_(
" -G, --nntp-browser Open NNTP browser"));
110 puts(
_(
" -g, --nntp-server <server> Use this NNTP server"));
111 puts(
_(
" -p, --postponed Resume postponed email"));
112 puts(
_(
" -R, --read-only Open mailbox read-only"));
113 puts(
_(
" -y, --browser Open mailbox browser"));
114 puts(
_(
" -Z, --check-new-mail Check for new mail"));
115 puts(
_(
" -z, --check-any-mail Check for any mail"));
119 printf(
"%s \033[1m%s\033[0m\n",
_(
"For detailed help, run:"),
"neomutt --help all");
121 printf(
"%s %s\n",
_(
"For detailed help, run:"),
"neomutt --help all");
131 print_header(
"shared",
_(
"Options that apply to all modes"), use_color);
134 puts(
_(
"By default NeoMutt loads one system and one user config file,"));
135 puts(
_(
"e.g. /etc/neomuttrc and ~/.neomuttrc"));
138 puts(
_(
" -n, --no-system-config Don't read system config file"));
139 puts(
_(
" -F, --config <file> Use this user config file"));
140 puts(
_(
" May be used multiple times"));
143 puts(
_(
"These options override the config:"));
144 puts(
_(
" -m, --mbox-type <type> Set default mailbox type"));
145 puts(
_(
" May be: maildir, mbox, mh, mmdf"));
146 puts(
_(
" -e, --command <command> Run extra commands"));
147 puts(
_(
" May be used multiple times"));
150 puts(
_(
"These logging options override the config:"));
151 puts(
_(
" -d, --debug-level <level> Set logging level"));
152 puts(
_(
" 0 (off), 1 (low) .. 5 (high)"));
153 puts(
_(
" -l, --debug-file <file> Set logging file"));
154 puts(
_(
" Default file '~/.neomuttdebug0'"));
158 printf(
"\033[1m%s\033[0m\n",
_(
"Examples:"));
160 printf(
"%s\n",
_(
"Examples:"));
163 puts(
_(
" neomutt --no-system-config"));
164 puts(
_(
" neomutt --config work.rc"));
165 puts(
_(
" neomutt --config work.rc --config colours.rc"));
168 puts(
_(
" neomutt --mbox-type maildir"));
169 puts(
_(
" neomutt --command 'set ask_cc = yes'"));
172 puts(
_(
" neomutt --debug-level 2"));
173 puts(
_(
" neomutt --debug-level 5 --debug-file neolog"));
176 puts(
_(
"See also:"));
177 puts(
_(
"- Config files: https://neomutt.org/guide/configuration"));
187 print_header(
"help",
_(
"Get command line help for NeoMutt"), use_color);
191 puts(
_(
" -h, --help Overview of command line options"));
192 puts(
_(
" -h, --help <mode> Detailed help for: shared, help, info, send, tui, all"));
193 puts(
_(
" -v, --version NeoMutt version and build parameters"));
194 puts(
_(
" -vv, --license NeoMutt Copyright and license"));
198 printf(
"\033[1m%s\033[0m\n",
_(
"Examples:"));
200 printf(
"%s\n",
_(
"Examples:"));
203 puts(
_(
" neomutt --help info"));
204 puts(
_(
" neomutt --license"));
214 print_header(
"info",
_(
"Ask NeoMutt for config information"), use_color);
218 puts(
_(
" -A, --alias <alias> [...] Lookup email aliases"));
219 puts(
_(
" Multiple aliases can be looked up (space-separated)"));
222 puts(
_(
" -D, --dump-config Dump all the config options"));
223 puts(
_(
" -DD, --dump-changed-config Dump the changed config options"));
226 puts(
_(
" -Q, --query <option> [...] Query config options"));
227 puts(
_(
" Multiple options can be looked up (space-separated)"));
229 puts(
_(
"Modify the -D and -Q options:"));
230 puts(
_(
" -O, --with-docs Add one-liner documentation"));
231 puts(
_(
" -S, --hide-sensitive Hide the value of sensitive options"));
235 printf(
"\033[1m%s\033[0m\n",
_(
"Examples:"));
237 printf(
"%s\n",
_(
"Examples:"));
240 puts(
_(
" neomutt --alias flatcap gahr"));
241 puts(
_(
" neomutt --dump-config --with-docs"));
242 puts(
_(
" neomutt --dump-changed-config --hide-sensitive"));
243 puts(
_(
" neomutt --with-docs --query alias_format index_format"));
253 print_header(
"send",
_(
"Send an email from the command line"), use_color);
256 puts(
_(
"These options can supply everything NeoMutt needs to send an email."));
257 puts(
_(
"If any parts are missing, NeoMutt will start the TUI to ask for them."));
258 puts(
_(
"Addresses may be used before the options, or after a -- marker."));
259 puts(
_(
"Aliases may be used in place of addresses."));
263 puts(
_(
" -a, --attach <file> [...] Attach files"));
264 puts(
_(
" Terminated by -- or another option"));
265 puts(
_(
" -b, --bcc <address> Add Bcc: address"));
266 puts(
_(
" -C, --crypto Use crypto (signing/encryption)"));
267 puts(
_(
" Must be set up in the config file"));
268 puts(
_(
" -c, --cc <address> Add Cc: address"));
269 puts(
_(
" -E, --edit-message Edit message (draft/include)"));
270 puts(
_(
" (supplied by -H or -i)"));
271 puts(
_(
" -H, --draft <file> Use draft email file"));
272 puts(
_(
" Full email with headers and body"));
273 puts(
_(
" -i, --include <file> Include body file"));
274 puts(
_(
" -s, --subject <subject> Set Subject:"));
275 puts(
_(
" -- <address> [...] Add To: addresses"));
279 printf(
"\033[1m%s\033[0m\n",
_(
"Examples:"));
281 printf(
"%s\n",
_(
"Examples:"));
284 puts(
_(
" neomutt flatcap --subject 'Meeting' < meeting.txt"));
285 puts(
_(
" neomutt jim@example.com --cc bob@example.com --subject 'Party' --include party.txt"));
286 puts(
_(
" neomutt --subject 'Receipts' --attach receipt1.pdf receipt2.pdf -- rocco"));
287 puts(
_(
" cat secret.txt | neomutt gahr --subject 'Secret' --crypto"));
297 print_header(
"tui",
_(
"Start NeoMutt's TUI (Terminal User Interface)"), use_color);
300 puts(
_(
"Running NeoMutt with no options will read the config and start the TUI."));
301 puts(
_(
"By default, it will open the Index Dialog with the $spool_file Mailbox."));
304 puts(
_(
"These options cause NeoMutt to check a mailbox for mail."));
305 puts(
_(
"If the condition isn't matched, NeoMutt exits."));
306 puts(
_(
" -p, --postponed Resume postponed email"));
307 puts(
_(
" -Z, --check-new-mail Check for new mail"));
308 puts(
_(
" -z, --check-any-mail Check for any mail"));
312 puts(
_(
"These options change the starting behavior:"));
313 puts(
_(
" -f, --folder <mailbox> Open this mailbox"));
314 puts(
_(
" -G, --nntp-browser Open NNTP browser"));
315 puts(
_(
" -g, --nntp-server <server> Use this NNTP server"));
316 puts(
_(
" -R, --read-only Open mailbox read-only"));
317 puts(
_(
" -y, --browser Open mailbox browser"));
321 printf(
"\033[1m%s\033[0m\n",
_(
"Examples:"));
323 printf(
"%s\n",
_(
"Examples:"));
326 puts(
_(
" neomutt --folder ~/mail --check-new-mail"));
327 puts(
_(
" neomutt --postponed"));
328 puts(
_(
" neomutt --browser"));
377 printf(
"------------------------------------------------------------\n");
379 printf(
"\n------------------------------------------------------------\n");
381 printf(
"\n------------------------------------------------------------\n");
383 printf(
"\n------------------------------------------------------------\n");
385 printf(
"\n------------------------------------------------------------\n");
387 printf(
"\n------------------------------------------------------------\n");
Convenience wrapper for the library headers.
HelpMode
Show detailed help.
@ HM_SEND
Help about sending email options.
@ HM_ALL
Help about all options.
@ HM_HELP
Help about help.
@ HM_INFO
Help about info options.
@ HM_TUI
Help about starting the tui options.
@ HM_SHARED
Help about shared config options.
static void show_cli_tui(bool use_color)
Show Command Line Help for Tui.
static void show_cli_shared(bool use_color)
Show Command Line Help for Shared.
static void show_cli_info(bool use_color)
Show Command Line Help for Info.
static void show_cli_overview(bool use_color)
Display NeoMutt command line.
static void print_header(const char *section, const char *desc, bool use_color)
Print a section header.
void show_cli(enum HelpMode mode, bool use_color)
Show Instructions on how to run NeoMutt.
static void show_cli_help(bool use_color)
Show Command Line Help for Help.
static void show_cli_send(bool use_color)
Show Command Line Help for Send.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Display version and copyright about NeoMutt.