Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authormorganamilo <morganamilo@gmail.com>2019-05-29 23:36:34 +0100
committerAllan McRae <allan@archlinux.org>2019-06-06 10:30:04 +1000
commitff1ae94c102cab487444bcdb0c76ee489c11dfe8 (patch)
tree56a7f58d0b8035fac065e2b70cc8b413081086df /src/pacman/pacman.c
parenteb92bcb089a19dd456ce244732415660cf393a89 (diff)
pacman: rework the UI of -F
Reworks the UI of -F according to FS#47949 In short -F replaces both -Fs and -Fo. Searching for an exact path (target contains "/"), causes the output to switch to the old -Fo output. Otherwise the old -Fs output is used. Also strip the leading "/" from targets like how -Qo does. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 3bb622e6..93fb98a4 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -177,9 +177,7 @@ static void usage(int op, const char * const myname)
printf("%s:\n", str_opt);
} else if(op == PM_OP_FILES) {
addlist(_(" -l, --list list the files owned by the queried package\n"));
- addlist(_(" -o, --owns <file> query the package that owns <file>\n"));
addlist(_(" -q, --quiet show less information for query and search\n"));
- addlist(_(" -s, --search <file> search package file names for matching strings\n"));
addlist(_(" -x, --regex enable searching using regular expressions\n"));
addlist(_(" -y, --refresh download fresh package databases from the server\n"
" (-yy to force a refresh even if up to date)\n"));
@@ -753,18 +751,10 @@ static int parsearg_files(int opt)
return 0;
}
switch(opt) {
- case OP_OWNS:
- case 'o':
- config->op_q_owns = 1;
- break;
case OP_LIST:
case 'l':
config->op_q_list = 1;
break;
- case OP_SEARCH:
- case 's':
- config->op_s_search = 1;
- break;
case OP_REFRESH:
case 'y':
(config->op_s_sync)++;
@@ -788,13 +778,8 @@ static int parsearg_files(int opt)
static void checkargs_files(void)
{
- if(config->op_q_owns) {
- invalid_opt(config->op_q_list, "--owns", "--list");
- invalid_opt(config->op_q_search, "--owns", "--search");
- invalid_opt(config->op_f_regex, "--owns", "--regex");
- } else if(config->op_q_list) {
- invalid_opt(config->op_q_search, "--list", "--search");
- invalid_opt(config->op_f_regex, "--list", "--regex");
+ if(config->op_q_search) {
+ invalid_opt(config->op_q_list, "--regex", "--list");
}
}