Parse `-` and `--` as non-option arguments
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 1 Jun 2021 15:42:56 +0000 (11:42 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 4 Jun 2021 17:59:12 +0000 (13:59 -0400)
commitdd757a651292048da829dd6fa085c1f107569bcc
treee2397c3d0f76a91f9c4c92d9d2d714d1a3abd41c
parenta29790113ff3345f42834c3d9be99bb8055ff071
Parse `-` and `--` as non-option arguments

The `-` and `--` arguments are common in many Unix command-line tools.
`--` often means "end of options" while `-` often means "read from
standard input". Depending on the application, they can have different
meanings.

This patch makes argpar_iter_next() specifically parse `-` and `--`
arguments as non-options.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I3b3f1670863992a17a7edfabdc48c921f71cd4b6
argpar/argpar.c
argpar/argpar.h
tests/test_argpar.c
This page took 0.031725 seconds and 4 git commands to generate.