wxMaxima
Loading...
Searching...
No Matches
Data Structures | Enumerations | Variables
CommandLineOptions.h File Reference

The one definition of wxMaxima's command-line options. More...

#include <array>
#include <string_view>
Include dependency graph for CommandLineOptions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  wxm::cmdline::Option
 One command-line option. More...
 

Enumerations

enum class  wxm::cmdline::Kind { Switch , Option }
 Whether an entry is a bare switch or takes a value.
 
enum class  wxm::cmdline::Complete { Nothing , Openable , AnyFile }
 What a shell should offer to complete the value of an option with. More...
 

Variables

constexpr std::array wxm::cmdline::Options
 Every option wxMaxima understands, in the order –help lists them.
 
constexpr std::string_view wxm::cmdline::ParamDescription = "input file"
 The description of the positional arguments (the files to open)
 
constexpr std::array< std::string_view, 10 > wxm::cmdline::OpenableExtensions
 The extensions (without the dot, lower case) of the files wxMaxima opens.
 

Detailed Description

The one definition of wxMaxima's command-line options.

Everything that describes the command line is made from this table:

The documents that cannot be generated – the German man page and the manual's "Command-line arguments" chapter, which po4a translates – are checked against this table by the ctest command_line_options_documented, so an option missing from them fails CI instead of going unnoticed.

Enumeration Type Documentation

◆ Complete

enum class wxm::cmdline::Complete
strong

What a shell should offer to complete the value of an option with.

Enumerator
Nothing 

Free text: offer nothing.

Openable 

A file wxMaxima opens (see OpenableExtensions)

AnyFile 

Any file (or program: a path, too)

Variable Documentation

◆ OpenableExtensions

constexpr std::array<std::string_view, 10> wxm::cmdline::OpenableExtensions
inlineconstexpr
Initial value:
{
"wxm", "wxmx", "zip", "mac", "out", "xml", "dem", "lisp", "lsp", "mc"}

The extensions (without the dot, lower case) of the files wxMaxima opens.

This is what the shells offer for the positional arguments and for –open. It mirrors ClassifyFileForOpening() (FileOpenKind.cpp); test_FileOpenKind checks that each of them is accepted there. Backup files (".wxm~") are deliberately left out: nobody wants them offered by Tab.