mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
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:
parent
306014adc7
commit
4067c82486
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user