devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Script Directory Support

Open rawkode opened this issue 1 year ago • 2 comments

I understand that we can configure scripts with scripts.dev.exec = ''...''.

I quite like to get syntax highlighting and linting for my shell scripts, as such I've started using scripts.dev.exec = builtins.readFile ./scripts/dev.sh; instead.

This works, but manually hooking up each script to each script file is a little cumbersome.

Could we get a helper that allows scripts.directory = './scripts'; ?

The name of the file would be how we invocate and the contents get executed using the interpretor from the shebang?

rawkode avatar Jun 07 '24 16:06 rawkode

I seen in the common patterns doc that you suggest doing the following for this use-case:

  enterShell = ''
    export PATH="$HOME/.mix/escripts:$PATH"
  '';

rawkode avatar Jun 08 '24 09:06 rawkode

We need something like this: https://code.tvl.fyi/about/nix/readTree

domenkozar avatar Jun 12 '24 14:06 domenkozar