|
| LegacyArgs (const std::string &programName, std::function< bool(Strings::iterator &arg, const Strings::iterator &end)> parseArg) |
|
bool | processFlag (Strings::iterator &pos, Strings::iterator end) override |
|
bool | processArgs (const Strings &args, bool finish) override |
|
| MixCommonArgs (const std::string &programName) |
|
virtual std::string | description () |
|
virtual bool | forceImpureByDefault () |
|
virtual std::string | doc () |
|
void | addFlag (Flag &&flag) |
|
void | removeFlag (const std::string &longName) |
|
void | expectArgs (ExpectedArg &&arg) |
|
void | expectArg (const std::string &label, std::string *dest, bool optional=false) |
|
void | expectArg (const std::string &label, std::filesystem::path *dest, bool optional=false) |
|
void | expectArgs (const std::string &label, std::vector< std::string > *dest) |
|
virtual nlohmann::json | toJSON () |
|
RootArgs & | getRoot () |
|
void | parseCmdline (const Strings &cmdline, bool allowShebang=false) |
|
Path | getCommandBaseDir () const override |
| Get the base directory for the command.
|
|
|
std::function< bool(Strings::iterator &arg, const Strings::iterator &end)> | parseArg |
|
std::string | programName |
|
MultiCommand * | parent = nullptr |
|
std::shared_ptr< Completions > | completions |
|
◆ processArgs()
bool nix::LegacyArgs::processArgs |
( |
const Strings & | args, |
|
|
bool | finish ) |
|
overridevirtual |
Process some positional arugments
- Parameters
-
finish | We have parsed everything else, and these are the only arguments left. Used because we accumulate some "pending args" we might have left over. |
Reimplemented from nix::Args.
◆ processFlag()
bool nix::LegacyArgs::processFlag |
( |
Strings::iterator & | pos, |
|
|
Strings::iterator | end ) |
|
overridevirtual |
Process a single flag and its arguments, pulling from an iterator of raw CLI args as needed.
Reimplemented from nix::Args.
The documentation for this struct was generated from the following files:
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libmain/shared.hh
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libmain/shared.cc