Skip to content
Snippets Groups Projects
Commit 24e23a1a authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

nix search: Add examples

parent 4967f050
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,24 @@ struct CmdSearch : SourceExprCommand, MixJSON ...@@ -56,6 +56,24 @@ struct CmdSearch : SourceExprCommand, MixJSON
return "query available packages"; 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 void run(ref<Store> store) override
{ {
settings.readOnlyMode = true; settings.readOnlyMode = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment