diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-09-14 19:05:28 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-09-14 19:32:33 +0200 |
commit | 817562e6946fa44c253beb76a36d85b55fd9c14d (patch) | |
tree | 9259231b8a4eebd81344a8f323d8737ef2c7f0f9 /src/libutil/args.hh | |
parent | 1fbaf367292a8eb57a120f74daacabccce622f2f (diff) |
Add "nix profile rollback" command
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r-- | src/libutil/args.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh index 22c94b501..7521b3065 100644 --- a/src/libutil/args.hh +++ b/src/libutil/args.hh @@ -91,6 +91,14 @@ protected: }) , arity(1) { } + + template<class I> + Handler(std::optional<I> * dest) + : fun([=](std::vector<std::string> ss) { + *dest = string2IntWithUnitPrefix<I>(ss[0]); + }) + , arity(1) + { } }; /* Options. */ |