summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvy Foster <iff@escondida.tk>2018-02-15 23:20:39 +0100
committerAllan McRae <allan@archlinux.org>2018-03-14 03:16:58 +0100
commit2dd8b88d5cbb04ccab528cdd7b6b4db04c514748 (patch)
tree90796de3f6ec102e2c1cf11a56be4f90d6faaa0f
parentd8591dd3418d55c5736022ef003891fc03b953e0 (diff)
downloadpacman-2dd8b88d5cbb04ccab528cdd7b6b4db04c514748.tar.gz
pacman-2dd8b88d5cbb04ccab528cdd7b6b4db04c514748.tar.xz
pacman-conf.c: add short options
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/pacman-conf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index 1e6f55f9..ab73d896 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -42,13 +42,13 @@ static void usage(int ret)
hputs("usage: pacman-conf [options] [<directive>...]");
hputs(" pacman-conf (--repo-list|--help|--version)");
hputs("options:");
- hputs(" --config=<path> set an alternate configuration file");
- hputs(" --rootdir=<path> set an alternate installation root");
- hputs(" --repo=<remote> query options for a specific repo");
- hputs(" --verbose always show directive names");
- hputs(" --repo-list list configured repositories");
- hputs(" --help display this help information");
- hputs(" --version display version information");
+ hputs(" -c, --config=<path> set an alternate configuration file");
+ hputs(" -R, --rootdir=<path> set an alternate installation root");
+ hputs(" -r, --repo=<remote> query options for a specific repo");
+ hputs(" -v, --verbose always show directive names");
+ hputs(" -l, --repo-list list configured repositories");
+ hputs(" -h, --help display this help information");
+ hputs(" -V, --version display version information");
#undef hputs
cleanup();
exit(ret);
@@ -59,7 +59,7 @@ static void parse_opts(int argc, char **argv)
int c;
config_file = CONFFILE;
- const char *short_opts = "";
+ const char *short_opts = "c:hlR:r:Vv";
struct option long_opts[] = {
{ "config" , required_argument , NULL , 'c' },
{ "rootdir" , required_argument , NULL , 'R' },