aboutsummaryrefslogtreecommitdiff
path: root/src/nix/ls.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-02-19 20:38:06 +0100
committerEelco Dolstra <edolstra@gmail.com>2018-02-19 20:38:53 +0100
commit70eb64147e073a0a7cf1d44af6815cfd4f8d507f (patch)
treedba5f62e4dc9d85dbed215075917ea2b6f8fd79a /src/nix/ls.cc
parenta6c0b773b72d4e30690e01f1f1dcffc28f2d9ea1 (diff)
Update release notes
Also add some examples to nix --help.
Diffstat (limited to 'src/nix/ls.cc')
-rw-r--r--src/nix/ls.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nix/ls.cc b/src/nix/ls.cc
index 69620595d..e99622faf 100644
--- a/src/nix/ls.cc
+++ b/src/nix/ls.cc
@@ -90,6 +90,16 @@ struct CmdLsStore : StoreCommand, MixLs
expectArg("path", &path);
}
+ Examples examples() override
+ {
+ return {
+ Example{
+ "To list the contents of a store path in a binary cache:",
+ "nix ls-store --store https://cache.nixos.org/ -lR /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10"
+ },
+ };
+ }
+
std::string name() override
{
return "ls-store";
@@ -116,6 +126,16 @@ struct CmdLsNar : Command, MixLs
expectArg("path", &path);
}
+ Examples examples() override
+ {
+ return {
+ Example{
+ "To list a specific file in a NAR:",
+ "nix ls-nar -l hello.nar /bin/hello"
+ },
+ };
+ }
+
std::string name() override
{
return "ls-nar";