aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-20 12:21:46 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-20 12:21:46 +0200
commitdc2f278c95ce4a73749cbb8221a568201535d46a (patch)
tree9e4a754396d63b731ed7e5ccfb7e572547d06e1a /src/libutil/args.hh
parent3c4f8c91759ac5ed6a211f8e72b9d4e8438db833 (diff)
Allow 'nix' subcommands to provide docs in Markdown format
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r--src/libutil/args.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh
index c56044f1d..3c1f87f7e 100644
--- a/src/libutil/args.hh
+++ b/src/libutil/args.hh
@@ -22,6 +22,7 @@ public:
virtual void printHelp(const string & programName, std::ostream & out);
+ /* Return a short one-line description of the command. */
virtual std::string description() { return ""; }
protected:
@@ -221,6 +222,9 @@ struct Command : virtual Args
virtual void prepare() { };
virtual void run() = 0;
+ /* Return documentation about this command, in Markdown format. */
+ virtual std::string doc() { return ""; }
+
struct Example
{
std::string description;