1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-10-01 08:44:09 +02:00

allow specifying #! inside shell

fixes #51
This commit is contained in:
Robin Appelman 2026-09-20 16:21:57 +02:00
commit d398b9f9e1
4 changed files with 60 additions and 17 deletions

View file

@ -447,8 +447,19 @@ script can be overriden by running the script with
## Nushell scripts
By default, the script contents are executed as a `bash` script, you can instead
execute the script as a `nushell` script by using `.nu` as the file extention.
By default, the script contents are executed as either `bash` script, or `nu` script based on the extension.
You can overwrite the interpreter used to execute the script by adding an extra `#!` line to the script, for example:
```bash
#! /usr/bin/env -S haze script
#! haze shell pgsql s3
#! php -f
<?php
print("Hello");
```
Note that the interpreter used needs to already be available inside the haze container.
## Configuration