mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
nix: Respect -I, --arg, --argstr
Also, random cleanup to argument handling.
This commit is contained in:
parent
25f32625e2
commit
0d59f1ca49
26 changed files with 349 additions and 299 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "util.hh"
|
||||
#include "args.hh"
|
||||
#include "common-args.hh"
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -69,6 +70,19 @@ template<class N> N getIntArg(const string & opt,
|
|||
}
|
||||
|
||||
|
||||
struct LegacyArgs : public MixCommonArgs
|
||||
{
|
||||
std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> parseArg;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
/* Show the manual page for the specified program. */
|
||||
void showManPage(const string & name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue