pacman-conf.c: add short options
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
d8591dd341
commit
2dd8b88d5c
1 changed files with 8 additions and 8 deletions
|
@ -42,13 +42,13 @@ static void usage(int ret)
|
||||||
hputs("usage: pacman-conf [options] [<directive>...]");
|
hputs("usage: pacman-conf [options] [<directive>...]");
|
||||||
hputs(" pacman-conf (--repo-list|--help|--version)");
|
hputs(" pacman-conf (--repo-list|--help|--version)");
|
||||||
hputs("options:");
|
hputs("options:");
|
||||||
hputs(" --config=<path> set an alternate configuration file");
|
hputs(" -c, --config=<path> set an alternate configuration file");
|
||||||
hputs(" --rootdir=<path> set an alternate installation root");
|
hputs(" -R, --rootdir=<path> set an alternate installation root");
|
||||||
hputs(" --repo=<remote> query options for a specific repo");
|
hputs(" -r, --repo=<remote> query options for a specific repo");
|
||||||
hputs(" --verbose always show directive names");
|
hputs(" -v, --verbose always show directive names");
|
||||||
hputs(" --repo-list list configured repositories");
|
hputs(" -l, --repo-list list configured repositories");
|
||||||
hputs(" --help display this help information");
|
hputs(" -h, --help display this help information");
|
||||||
hputs(" --version display version information");
|
hputs(" -V, --version display version information");
|
||||||
#undef hputs
|
#undef hputs
|
||||||
cleanup();
|
cleanup();
|
||||||
exit(ret);
|
exit(ret);
|
||||||
|
@ -59,7 +59,7 @@ static void parse_opts(int argc, char **argv)
|
||||||
int c;
|
int c;
|
||||||
config_file = CONFFILE;
|
config_file = CONFFILE;
|
||||||
|
|
||||||
const char *short_opts = "";
|
const char *short_opts = "c:hlR:r:Vv";
|
||||||
struct option long_opts[] = {
|
struct option long_opts[] = {
|
||||||
{ "config" , required_argument , NULL , 'c' },
|
{ "config" , required_argument , NULL , 'c' },
|
||||||
{ "rootdir" , required_argument , NULL , 'R' },
|
{ "rootdir" , required_argument , NULL , 'R' },
|
||||||
|
|
Loading…
Add table
Reference in a new issue