diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-12-08 18:09:30 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-12-21 13:32:27 +0100 |
commit | e9de689a6efca961099f1acfc574009f31a6f130 (patch) | |
tree | a99f34899d7dba6384c6b2f2fc9d78f988780568 /src/nix/search.cc | |
parent | 28ee307fd8d38e8f6c8dd9d2575435036f3612cf (diff) |
Add 'nix search' manpage
Diffstat (limited to 'src/nix/search.cc')
-rw-r--r-- | src/nix/search.cc | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc index 47770e128..9f864b3a4 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -41,29 +41,14 @@ struct CmdSearch : InstallableCommand, MixJSON std::string description() override { - return "query available packages"; + return "search for packages"; } - Examples examples() override + std::string doc() override { - return { - Example{ - "To show all packages in the flake in the current directory:", - "nix search" - }, - Example{ - "To show packages in the 'nixpkgs' flake containing 'blender' in its name or description:", - "nix search nixpkgs blender" - }, - Example{ - "To search for Firefox or Chromium:", - "nix search nixpkgs 'firefox|chromium'" - }, - Example{ - "To search for packages containing 'git' and either 'frontend' or 'gui':", - "nix search nixpkgs git 'frontend|gui'" - } - }; + return + #include "search.md" + ; } Strings getDefaultFlakeAttrPaths() override |