mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
doc/command-ref/nix-shell: Shebangs can occur anywhere (#11202)
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
This commit is contained in:
parent
c77b671a66
commit
ee86e7f361
1 changed files with 5 additions and 0 deletions
|
@ -297,3 +297,8 @@ with import <nixpkgs> {};
|
||||||
|
|
||||||
runCommand "dummy" { buildInputs = [ python pythonPackages.prettytable ]; } ""
|
runCommand "dummy" { buildInputs = [ python pythonPackages.prettytable ]; } ""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The script's file name is passed as the first argument to the interpreter specified by the `-i` flag.
|
||||||
|
|
||||||
|
Aside from the very first line, which is a directive to the operating system, the additional `#! nix-shell` lines do not need to be at the beginning of the file.
|
||||||
|
This allows wrapping them in block comments for languages where `#` does not start a comment, such as ECMAScript, Erlang, PHP, or Ruby.
|
||||||
|
|
Loading…
Reference in a new issue