mirror of
https://github.com/NixOS/nix
synced 2025-07-04 03:01:47 +02:00
New command line parsing infrastructure
This commit is contained in:
parent
c780c1124e
commit
0db9e6cd1a
6 changed files with 472 additions and 81 deletions
22
src/libmain/common-args.hh
Normal file
22
src/libmain/common-args.hh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include "args.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
struct MixCommonArgs : virtual Args
|
||||
{
|
||||
MixCommonArgs(const string & programName);
|
||||
};
|
||||
|
||||
struct MixDryRun : virtual Args
|
||||
{
|
||||
bool dryRun;
|
||||
|
||||
MixDryRun()
|
||||
{
|
||||
mkFlag(0, "dry-run", "show what this command would do without doing it", &dryRun);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue