nix-super/tests/functional/flakes
Tom Bereknyei 74210c12fe Shellbang support with flakes
Enables shebang usage of nix shell. All arguments with `#! nix` get
added to the nix invocation. This implementation does NOT set any
additional arguments other than placing the script path itself as the
first argument such that the interpreter can utilize it.

Example below:

```
    #!/usr/bin/env nix
    #! nix shell --quiet
    #! nix nixpkgs#bash
    #! nix nixpkgs#shellcheck
    #! nix nixpkgs#hello
    #! nix --ignore-environment --command bash
    # shellcheck shell=bash
    set -eu
    shellcheck "$0" || exit 1
    function main {
        hello
        echo 0:"$0" 1:"$1" 2:"$2"
    }
    "$@"
```

fix: include programName usage

EDIT: For posterity I've changed shellwords to shellwords2 in order
      not to interfere with other changes during a rebase.
      shellwords2 is removed in a later commit. -- roberth
2023-11-07 13:24:01 -05:00
..
absolute-attr-paths.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
absolute-paths.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
build-paths.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
bundle.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
check.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
circular.sh Overhaul nix flake update and lock commands 2023-10-31 15:33:57 +01:00
common.sh Shellbang support with flakes 2023-11-07 13:24:01 -05:00
config.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
flake-in-submodule.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
flakes.sh Shellbang support with flakes 2023-11-07 13:24:01 -05:00
follow-paths.sh Overhaul nix flake update and lock commands 2023-10-31 15:33:57 +01:00
init.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
inputs.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
mercurial.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
run.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
search-root.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
show.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00
unlocked-override.sh Put functional tests in tests/functional 2023-10-06 09:05:56 -04:00