diff --git a/README.md b/README.md index 4756df3..a6d8c7d 100644 --- a/README.md +++ b/README.md @@ -2135,8 +2135,17 @@ the file as executable, and executing it. The OS then parses the shebang line into a command line and invokes it, including the path to the file. For example, if a recipe starts with `#!/usr/bin/env bash`, the final command that the OS runs will be something like `/usr/bin/env bash -/tmp/PATH_TO_SAVED_RECIPE_BODY`. Keep in mind that different operating systems -split shebang lines differently. +/tmp/PATH_TO_SAVED_RECIPE_BODY`. + +Shebang line splitting is operating system dependent. When passing a command +with arguments, you may need to tell `env` to split them explicitly by using +the `-S` flag: + +```just +run: + #!/usr/bin/env -S bash -x + ls +``` Windows does not support shebang lines. On Windows, `just` splits the shebang line into a command and arguments, saves the recipe body to a file, and invokes