pacman/scripts
Ethan Sommer 7be7552329 libmakepkg: add optional argument support to parseopts
Adds a "?" suffix that can be used to indicate that an option's argument is
optional.

This allows options to have a default behaviour when the user doesn't
specify one, e.g.: --color=[when] being able to behave like --color=auto
when only --color is passed

Options with optional arguments given on the command line will be returned
in the form "--opt=optarg" and "-o=optarg". Despite that not being the
syntax for passing an argument with a shortopt (trying to pass -o=foo
would make -o's argument "=foo"), this is done to allow the caller to split
the option and its optarg easily

Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com>
Reviewed-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-04 10:55:23 +10:00
..
completion Remove --force from completion 2019-10-23 22:06:54 +10:00
libmakepkg libmakepkg: add optional argument support to parseopts 2019-11-04 10:55:23 +10:00
library scripts/library: fix typo in README 2018-12-10 11:12:27 +10:00
po Pull latest translations from Transifex 2019-11-01 10:54:12 +10:00
.gitignore libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
libmakepkg.pc.in libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
Makefile.am makepkg: do not count hard links multiple times when calculating pkg size 2019-10-30 10:03:46 +10:00
makepkg-template.pl.in Update copyright years 2019-10-23 22:06:54 +10:00
makepkg.sh.in makepkg: only run --clean actions if we built a package 2019-10-30 10:04:17 +10:00
meson.build libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
pacman-db-upgrade.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
pacman-key.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
repo-add.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
wrapper.sh.in Update copyright years 2019-10-23 22:06:54 +10:00