aboutsummaryrefslogtreecommitdiff
path: root/src/nix/cat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/cat.cc')
-rw-r--r--src/nix/cat.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/nix/cat.cc b/src/nix/cat.cc
index 97306107c..e28ee3c50 100644
--- a/src/nix/cat.cc
+++ b/src/nix/cat.cc
@@ -37,7 +37,12 @@ struct CmdCatStore : StoreCommand, MixCat
return "print the contents of a file in the Nix store on stdout";
}
- Category category() override { return catUtility; }
+ std::string doc() override
+ {
+ return
+ #include "store-cat.md"
+ ;
+ }
void run(ref<Store> store) override
{
@@ -64,7 +69,12 @@ struct CmdCatNar : StoreCommand, MixCat
return "print the contents of a file inside a NAR file on stdout";
}
- Category category() override { return catUtility; }
+ std::string doc() override
+ {
+ return
+ #include "nar-cat.md"
+ ;
+ }
void run(ref<Store> store) override
{
@@ -72,5 +82,5 @@ struct CmdCatNar : StoreCommand, MixCat
}
};
-static auto r1 = registerCommand<CmdCatStore>("cat-store");
-static auto r2 = registerCommand<CmdCatNar>("cat-nar");
+static auto rCmdCatStore = registerCommand2<CmdCatStore>({"store", "cat"});
+static auto rCmdCatNar = registerCommand2<CmdCatNar>({"nar", "cat"});