feat(phoenix): Expose parsed arg tokens to apps that request them

Some shell apps care about what order the arguments appear in. When
`parseArgs()` is called with `tokens: true`, it produces this `tokens`
array which represents all the command line options and arguments, in
order, which is useful for these more advanced cases.
This commit is contained in:
Sam Atkins 2024-05-31 10:07:24 +01:00
parent 306014adc7
commit 4067c82486

View File

@ -43,5 +43,7 @@ export default {
ctx.locals.values = result.values; ctx.locals.values = result.values;
ctx.locals.positionals = result.positionals; ctx.locals.positionals = result.positionals;
if (result.tokens)
ctx.locals.tokens = result.tokens;
} }
} }