jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.03k stars 210 forks source link

Support alternative comment syntax for script task comments #2333

Open kj opened 6 days ago

kj commented 6 days ago

Describe the bug

Languages which do not use # as comment character cannot use comments like # mise description='' in a script task.

To Reproduce

Create a script task .mise/scripts/foo:

#!/usr/bin/env node

// mise description='Foo'

console.log('Foo');

Expected behavior The description should appear in mise tasks [ls], but it does not. If you change the comment character to #, the description appears, but of course you then get a syntax error when you run the task.

mise doctor output

version: 2024.6.6 linux-x64 (2024-06-21)
...