summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-12 13:32:07 -0400
committerAllan McRae <allan@archlinux.org>2013-10-14 13:01:15 +1000
commit3b804cb6543e10e3bc5f32af23925c35aadce444 (patch)
tree3aea08178c99c28af3eca3880f1bfe0ebde0f884
parent122e16106fdcc30918e53832edd9c70fe3772054 (diff)
downloadpacman-3b804cb6543e10e3bc5f32af23925c35aadce444.tar.xz
imply --print from --print-format
--print-format is totally useless without --print. Implying --print will also save us the hassle of checking it when we add transaction option validation. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--doc/pacman.8.txt2
-rw-r--r--src/pacman/pacman.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt
index 574995c4..ccc0a016 100644
--- a/doc/pacman.8.txt
+++ b/doc/pacman.8.txt
@@ -204,7 +204,7 @@ Transaction Options (apply to '-S', '-R' and '-U')
*\--print-format* <format>::
Specify a printf-like format to control the output of the '\--print'
operation. The possible attributes are: %n for pkgname, %v for pkgver,
- %l for location, %r for repo, and %s for size.
+ %l for location, %r for repo, and %s for size. Implies '\--print'.
Upgrade Options (apply to '-S' and '-U')[[UO]]
--------------------------------------------
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 93baa441..11f92cf7 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -574,6 +574,7 @@ static int parsearg_trans(int opt)
break;
case OP_PRINTFORMAT:
check_optarg();
+ config->print = 1;
config->print_format = strdup(optarg);
break;
default: