From da7d8daa77c2cce5805947a012060b02be9e4a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sat, 19 Feb 2022 16:59:52 +0100 Subject: Add shell completion for --override-flake Requires moving the MixEvalArgs class from libexpr to libcmd because that's where completeFlakeRef is. --- src/libcmd/common-eval-args.hh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/libcmd/common-eval-args.hh (limited to 'src/libcmd/common-eval-args.hh') diff --git a/src/libcmd/common-eval-args.hh b/src/libcmd/common-eval-args.hh new file mode 100644 index 000000000..03fa226aa --- /dev/null +++ b/src/libcmd/common-eval-args.hh @@ -0,0 +1,27 @@ +#pragma once + +#include "args.hh" + +namespace nix { + +class Store; +class EvalState; +class Bindings; + +struct MixEvalArgs : virtual Args +{ + MixEvalArgs(); + + Bindings * getAutoArgs(EvalState & state); + + Strings searchPath; + + std::optional evalStoreUrl; + +private: + std::map autoArgs; +}; + +Path lookupFileArg(EvalState & state, std::string_view s); + +} -- cgit v1.2.3