1
0
Fork 0
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:
Eelco Dolstra 2017-10-24 12:45:11 +02:00
parent 25f32625e2
commit 0d59f1ca49
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
26 changed files with 349 additions and 299 deletions

View file

@ -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);