aboutsummaryrefslogtreecommitdiff
path: root/src/nix/ls.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-07-24 20:42:24 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-12-03 18:09:02 +0100
commitef583303f0720d8bc9d6351cd769f92d5dd678f3 (patch)
tree8d15ff9adc90fb7d6a2499a33936e6ed0049f219 /src/nix/ls.cc
parent79c1967ded92574129c6a20116ef205a9c747bac (diff)
Move NAR-related commands to 'nix nar'
Diffstat (limited to 'src/nix/ls.cc')
-rw-r--r--src/nix/ls.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nix/ls.cc b/src/nix/ls.cc
index f39fdb2fd..d5fec4d84 100644
--- a/src/nix/ls.cc
+++ b/src/nix/ls.cc
@@ -134,7 +134,7 @@ struct CmdLsNar : Command, MixLs
return {
Example{
"To list a specific file in a NAR:",
- "nix ls-nar -l hello.nar /bin/hello"
+ "nix nar ls -l hello.nar /bin/hello"
},
};
}
@@ -144,13 +144,11 @@ struct CmdLsNar : Command, MixLs
return "show information about a path inside a NAR file";
}
- Category category() override { return catUtility; }
-
void run() override
{
list(makeNarAccessor(make_ref<std::string>(readFile(narPath))));
}
};
-static auto rCmdLsStore = registerCommand<CmdLsStore>("ls-store");
-static auto rCmdLsNar = registerCommand<CmdLsNar>("ls-nar");
+static auto rCmdLsStore = registerCommand2<CmdLsStore>({"store", "ls"});
+static auto rCmdLsNar = registerCommand2<CmdLsNar>({"nar", "ls"});