|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <args.hh>
Public Types | |
| typedef int | Category |
Public Member Functions | |
| virtual void | run ()=0 |
| virtual std::optional< ExperimentalFeature > | experimentalFeature () |
| virtual Category | category () |
| Public Member Functions inherited from nix::Args | |
| virtual std::string | description () |
| virtual bool | forceImpureByDefault () |
| virtual std::string | doc () |
| virtual AsyncIoRoot & | aio ()=0 |
| 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 | expectArgs (const std::string &label, std::vector< std::string > *dest) |
| virtual JSON | toJSON () |
| RootArgs & | getRoot () |
Static Public Attributes | |
| static constexpr Category | catDefault = 0 |
| static constexpr Category | catCustom = 1000 |
| Static Public Attributes inherited from nix::Args | |
| static CompleterFun | completePath |
| static CompleterFun | completeDir |
Friends | |
| class | MultiCommand |
Additional Inherited Members | |
| Public Attributes inherited from nix::Args | |
| MultiCommand * | parent = nullptr |
| Protected Types inherited from nix::Args | |
| typedef void | CompleterFun(AddCompletions &, size_t, std::string_view) |
| typedef std::function< CompleterFun > | CompleterClosure |
| Protected Member Functions inherited from nix::Args | |
| virtual bool | processFlag (Strings::iterator &pos, Strings::iterator end) |
| virtual bool | processArgs (const Strings &args, bool finish) |
| virtual Strings::iterator | rewriteArgs (Strings &args, Strings::iterator pos) |
| virtual void | initialFlagsProcessed () |
| virtual std::optional< std::reference_wrapper< RootArgs > > | asRootArgs () |
| Protected Attributes inherited from nix::Args | |
| std::map< std::string, Flag::ptr > | longFlags |
| std::map< char, Flag::ptr > | shortFlags |
| std::list< ExpectedArg > | expectedArgs |
| std::list< ExpectedArg > | processedArgs |
| std::set< std::string > | hiddenCategories |
| Static Protected Attributes inherited from nix::Args | |
| static const size_t | ArityAny = std::numeric_limits<size_t>::max() |
A command is an argument parser that can be executed by calling its run() method.
|
virtual |
Reimplemented in nix::CmdDoctor, nix::CmdRepl, and nix::CmdUpgradeNix.
|
pure virtual |
Entry point to the command
Implemented in nix::CmdConfig, nix::CmdConfigShow, nix::CmdDerivation, nix::CmdDumpPath2, nix::CmdFlake, nix::CmdHash, nix::CmdHashBase, nix::CmdHelp, nix::CmdHelpStores, nix::CmdKey, nix::CmdKeyConvertSecretToPublic, nix::CmdKeyGenerateSecret, nix::CmdLsNar, nix::CmdNar, nix::CmdProfile, nix::CmdRealisation, nix::CmdRegistry, nix::CmdRegistryAdd, nix::CmdRegistryRemove, nix::CmdStore, nix::CmdToBase, nix::ExternalCommand, nix::NixArgs, and nix::StoreCommand.