diff --git a/src/nix/search.cc b/src/nix/search.cc index 6e099ce377f10638299b7bc78c6c6feb3fd57d6e..9476b79fbc1b87674f6d3d2a274952451abcf2c6 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -56,6 +56,24 @@ struct CmdSearch : SourceExprCommand, MixJSON return "query available packages"; } + Examples examples() override + { + return { + Example{ + "To show all available packages:", + "nix search" + }, + Example{ + "To show any packages containing 'blender' in its name or description:", + "nix search blender" + }, + Example{ + "To search for Firefox and Chromium:", + "nix search 'firefox|chromium'" + }, + }; + } + void run(ref<Store> store) override { settings.readOnlyMode = true;