Provide a better ARGV API.
This issue tracks a proposal to improve GJS' ARGV API - both making it more ergonomic and friendly and ensuring we expose roughly equivalent functionality to Deno and Node to enable easy code reuse.
The Proposal:
-
system.argv
- the "correct" argv for C-style APIs
Whether this is a getter for [system.programInvocationName, ...system.programArgs]
or a separate array is an open question. It could also be system.argv()
-
system.programArgs
- the equivalent ofARGV
(the 'program' prefix indicates only program args) (MR: !455 (merged)) -
system.programPath
- the full path of the program (MR: !443 (merged)) -
system.argv0
- the frozen argv[0] from GJS -
system.execPath
- the GJS binary path (MR pending glib#31) -
system.execArgs
- the arguments passed to GJS
Edited by Evan Welsh