Closed docelic closed 4 years ago
We don't ever modify ARGV, but you can call any Enumerable on arguments
or call arguments[i]
to get the remaining args.
Hi,
Seconding removing parsed parts from ARGV. I just ran into an annoying bug with that this morning - I'm working on a command line tool that (amongst other things) starts a Kemal server via a subcommand, and Kemal.run
trips on the flags/arguments left over from the CLI. As a workaround I've been modifying ARGV myself, but honestly it's a bit ugly. It would be nice if Admiral had that built in (even if disabled by default) because in its current state it's a bit incompatible with other shards that use OptionParser
.
Hey,
If one defines some flags and arguments, like: define_flag a define_flag b define_argument c
Then upon calling: cmd subcmd -a one -b two three four
It would be great if there was a way to automatically remove parsed parts out of ARGV or original array, so that only "four" remains in it.
Currently, it appears as if original contents are never modified.