From 5473e10249e02f95375b6126e232700d51bdf429 Mon Sep 17 00:00:00 2001 From: thenbe <33713262+thenbe@users.noreply.github.com> Date: Thu, 7 Sep 2023 22:25:32 +0000 Subject: 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. --- src/nix/shell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix') 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: -- cgit v1.2.3