Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::NixArgs Struct Reference
Inheritance diagram for nix::NixArgs:
nix::MultiCommand nix::MixCommonArgs nix::RootArgs nix::Args nix::Args nix::Args

Public Member Functions

Strings::iterator rewriteArgs (Strings &args, Strings::iterator pos) override
 
std::string description () override
 
std::string doc () override
 
void pluginsInited () override
 
std::string dumpCli ()
 
- Public Member Functions inherited from nix::MultiCommand
 MultiCommand (std::string_view commandName, const Commands &commands)
 
bool processFlag (Strings::iterator &pos, Strings::iterator end) override
 
bool processArgs (const Strings &args, bool finish) override
 
nlohmann::json toJSON () override
 
- Public Member Functions inherited from nix::Args
virtual bool forceImpureByDefault ()
 
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)
 
RootArgsgetRoot ()
 
- Public Member Functions inherited from nix::MixCommonArgs
 MixCommonArgs (const std::string &programName)
 
- Public Member Functions inherited from nix::RootArgs
void parseCmdline (const Strings &cmdline, bool allowShebang=false)
 
Path getCommandBaseDir () const override
 Get the base directory for the command.
 

Public Attributes

bool useNet = true
 
bool refresh = false
 
bool helpRequested = false
 
bool showVersion = false
 
std::map< std::string, AliasInfoaliases
 
bool aliasUsed = false
 
- Public Attributes inherited from nix::MultiCommand
Commands commands
 
std::map< Command::Category, std::string > categories
 
std::optional< std::pair< std::string, ref< Command > > > command
 
- Public Attributes inherited from nix::Args
MultiCommandparent = nullptr
 
- Public Attributes inherited from nix::MixCommonArgs
std::string programName
 
- Public Attributes inherited from nix::RootArgs
std::shared_ptr< Completionscompletions
 

Additional Inherited Members

- Static Public Attributes inherited from nix::Args
static CompleterFun completePath
 
static CompleterFun completeDir
 
- Protected Types inherited from nix::Args
using CompleterFun = void(AddCompletions &, size_t, std::string_view)
 
using CompleterClosure = std::function<CompleterFun>
 
- Protected Attributes inherited from nix::MultiCommand
std::string commandName = ""
 
- Protected Attributes inherited from nix::Args
std::map< std::string, Flag::ptr > longFlags
 
std::map< char, Flag::ptr > shortFlags
 
std::list< ExpectedArgexpectedArgs
 
std::list< ExpectedArgprocessedArgs
 
std::set< std::string > hiddenCategories
 
- Protected Attributes inherited from nix::RootArgs
Path commandBaseDir = "."
 The command's "working directory", but only set when top level.
 
std::vector< DeferredCompletiondeferredCompletions
 
std::set< ExperimentalFeatureflagExperimentalFeatures
 
- Static Protected Attributes inherited from nix::Args
static const size_t ArityAny = std::numeric_limits<size_t>::max()
 

Member Function Documentation

◆ description()

std::string nix::NixArgs::description ( )
inlineoverridevirtual

Return a short one-line description of the command.

Reimplemented from nix::Args.

◆ doc()

std::string nix::NixArgs::doc ( )
inlineoverridevirtual

Return documentation about this command, in Markdown format.

Reimplemented from nix::Args.

◆ pluginsInited()

void nix::NixArgs::pluginsInited ( )
inlineoverridevirtual

Reimplemented from nix::MixCommonArgs.

◆ rewriteArgs()

Strings::iterator nix::NixArgs::rewriteArgs ( Strings & args,
Strings::iterator pos )
inlineoverridevirtual

Reimplemented from nix::Args.

Member Data Documentation

◆ aliases

std::map<std::string, AliasInfo> nix::NixArgs::aliases
Initial value:
= {
{"add-to-store", { AliasStatus::Deprecated, {"store", "add-path"}}},
{"cat-nar", { AliasStatus::Deprecated, {"nar", "cat"}}},
{"cat-store", { AliasStatus::Deprecated, {"store", "cat"}}},
{"copy-sigs", { AliasStatus::Deprecated, {"store", "copy-sigs"}}},
{"dev-shell", { AliasStatus::Deprecated, {"develop"}}},
{"diff-closures", { AliasStatus::Deprecated, {"store", "diff-closures"}}},
{"dump-path", { AliasStatus::Deprecated, {"store", "dump-path"}}},
{"hash-file", { AliasStatus::Deprecated, {"hash", "file"}}},
{"hash-path", { AliasStatus::Deprecated, {"hash", "path"}}},
{"ls-nar", { AliasStatus::Deprecated, {"nar", "ls"}}},
{"ls-store", { AliasStatus::Deprecated, {"store", "ls"}}},
{"make-content-addressable", { AliasStatus::Deprecated, {"store", "make-content-addressed"}}},
{"optimise-store", { AliasStatus::Deprecated, {"store", "optimise"}}},
{"ping-store", { AliasStatus::Deprecated, {"store", "info"}}},
{"sign-paths", { AliasStatus::Deprecated, {"store", "sign"}}},
{"shell", { AliasStatus::AcceptedShorthand, {"env", "shell"}}},
{"show-derivation", { AliasStatus::Deprecated, {"derivation", "show"}}},
{"show-config", { AliasStatus::Deprecated, {"config", "show"}}},
{"to-base16", { AliasStatus::Deprecated, {"hash", "to-base16"}}},
{"to-base32", { AliasStatus::Deprecated, {"hash", "to-base32"}}},
{"to-base64", { AliasStatus::Deprecated, {"hash", "to-base64"}}},
{"verify", { AliasStatus::Deprecated, {"store", "verify"}}},
{"doctor", { AliasStatus::Deprecated, {"config", "check"}}},
}

The documentation for this struct was generated from the following file: