diff options
author | thenbe <33713262+thenbe@users.noreply.github.com> | 2023-09-07 22:25:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 22:25:32 +0000 |
commit | 5473e10249e02f95375b6126e232700d51bdf429 (patch) | |
tree | 8bc9fea96d8c7b3c4a2c49c7aeea7314648fac25 /src | |
parent | 5f55c339172eda77c6fd69ee0ecbe35a08625a05 (diff) |
fix: `nix shell` multiple commands example (#8950)
The `-c` flag belongs to `sh` not `nix shell`. As it stands, the command errors with:
```
$ nix shell nixpkgs#gnumake --command sh --command "cd src && make"
sh: --command: invalid option
```
https://github.com/NixOS/nix/pull/8276 was good for readability, but it missed this since that PR used a find/replace script.
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/shell.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/shell.md b/src/nix/shell.md index 1668104b1..f36919575 100644 --- a/src/nix/shell.md +++ b/src/nix/shell.md @@ -26,7 +26,7 @@ R""( * Run multiple commands in a shell environment: ```console - # nix shell nixpkgs#gnumake --command sh --command "cd src && make" + # nix shell nixpkgs#gnumake --command sh -c "cd src && make" ``` * Run GNU Hello in a chroot store: |