diff --git a/source/tutorials/first-steps/ad-hoc-shell-environments.md b/source/tutorials/first-steps/ad-hoc-shell-environments.md index 5f3a530..54af71a 100644 --- a/source/tutorials/first-steps/ad-hoc-shell-environments.md +++ b/source/tutorials/first-steps/ad-hoc-shell-environments.md @@ -54,6 +54,20 @@ $ echo all gone | lolcat 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 What can you put in a shell environment?