aboutsummaryrefslogtreecommitdiff
path: root/src/nix/search.md
diff options
context:
space:
mode:
authorFishhh <hubert.gluchowski19@gmail.com>2022-06-05 18:45:58 +0200
committerHubert GÅ‚uchowski <hubert.gluchowski19@gmail.com>2022-06-07 18:25:48 +0200
commitb42358b9bec12dfdc419136f32ded2a4f7d7dea7 (patch)
tree3f0983ceed54905ddfa3b3884db67b396f41e34f /src/nix/search.md
parentd137ceccefe08250106dcede1f30c270b0f9cf19 (diff)
Add `--exclude` flag to `nix search`
If a package's attribute path, description or name contains matches for any of the regexes specified via `-e` or `--exclude` that package is excluded from the final output.
Diffstat (limited to 'src/nix/search.md')
-rw-r--r--src/nix/search.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nix/search.md b/src/nix/search.md
index d182788a6..5a5b5ae05 100644
--- a/src/nix/search.md
+++ b/src/nix/search.md
@@ -43,12 +43,23 @@ R""(
# nix search nixpkgs 'firefox|chromium'
```
-* Search for packages containing `git'`and either `frontend` or `gui`:
+* Search for packages containing `git` and either `frontend` or `gui`:
```console
# nix search nixpkgs git 'frontend|gui'
```
+* Search for packages containing `neovim` but hide ones containing either `gui` or `python`:
+
+ ```console
+ # nix search nixpkgs neovim -e 'python|gui'
+ ```
+ or
+
+ ```console
+ # nix search nixpkgs neovim -e 'python' -e 'gui'
+ ```
+
# Description
`nix search` searches *installable* (which must be evaluatable, e.g. a