mirror of
https://github.com/NixOS/nix.dev.git
synced 2024-10-18 00:06:26 -04:00
show nix-shell --run (#886)
* show nix-shell --run it's quite useful and not necessarily obvious without reading reference documentation Co-authored-by: Silvan Mosberger <github@infinisil.com>
This commit is contained in:
parent
5f1eea5bc2
commit
cf94730f93
|
@ -54,6 +54,20 @@ $ echo all gone | lolcat
|
||||||
The program ‘lolcat’ is currently not installed.
|
The program ‘lolcat’ is currently not installed.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Running programs once
|
||||||
|
|
||||||
|
You can go even faster, by running any program directly:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ nix-shell -p cowsay --run "cowsay Nix"
|
||||||
|
```
|
||||||
|
|
||||||
|
If the command consists only of the program name, no quotes are needed:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ nix-shell -p hello --run hello
|
||||||
|
```
|
||||||
|
|
||||||
## Search for packages
|
## Search for packages
|
||||||
|
|
||||||
What can you put in a shell environment?
|
What can you put in a shell environment?
|
||||||
|
|
Loading…
Reference in a new issue