* @file
* Parse the Command Line
*
* @authors
* Copyright (C) 2025 Richard Russon <rich@flatcap.org>
*
* @copyright
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MUTT_CLI_OBJECTS_H
#define MUTT_CLI_OBJECTS_H
#include <stdbool.h>
#include "mutt/lib.h"
* enum HelpMode - Show detailed help
*/
enum HelpMode
{
HM_NONE,
HM_SHARED,
HM_HELP,
HM_INFO,
HM_SEND,
HM_TUI,
HM_ALL,
};
* struct CliShared - Shared Command Line options
*/
struct CliShared
{
bool is_set;
struct StringArray user_files;
bool disable_system;
struct StringArray commands;
struct Buffer mbox_type;
struct Buffer log_level;
struct Buffer log_file;
};
* struct CliHelp - Help Mode Command Line options
*/
struct CliHelp
{
bool is_set;
bool help;
bool version;
bool license;
enum HelpMode mode;
};
* struct CliInfo - Info Mode Command Line options
*/
struct CliInfo
{
bool is_set;
bool dump_config;
bool dump_changed;
bool show_help;
bool hide_sensitive;
struct StringArray alias_queries;
struct StringArray queries;
};
* struct CliSend - Send Mode Command Line options
*/
struct CliSend
{
bool is_set;
bool use_crypto;
bool edit_infile;
struct StringArray attach;
struct StringArray bcc_list;
struct StringArray cc_list;
struct StringArray addresses;
struct Buffer draft_file;
struct Buffer include_file;
struct Buffer subject;
};
* struct CliTui - TUI Mode Command Line options
*/
struct CliTui
{
bool is_set;
bool read_only;
bool start_postponed;
bool start_browser;
bool start_nntp;
bool start_new_mail;
bool start_any_mail;
struct Buffer folder;
struct Buffer nntp_server;
};
* struct CommandLine - Command Line options
*/
struct CommandLine
{
struct CliShared shared;
struct CliHelp help;
struct CliInfo info;
struct CliSend send;
struct CliTui tui;
};
struct CommandLine *command_line_new(void);
void command_line_free(struct CommandLine **ptr);
#endif