sigoden/argc

Eats all double-dashes

CGamesPlay opened this issue · 0 comments

It's typical for programs to treat an argument of -- as signifying "end-of-arguments" and do not further parsing. Argc sort of follows this, but it removes all -- arguments from the input.

# @cmd
# @arg		command!		Command to run
test() {
	echo "${argc_command[@]}"
}
$ argc foo -- -- -- --
foo
$ echo foo -- -- -- --
foo -- -- -- --