From 7c956d5d4bdf89bfece1244baa56a92f83bd9161 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 1 Sep 2011 18:01:33 -0500 Subject: Add -p/--print tip for -Q operations on filepath Signed-off-by: Dan McGee --- src/pacman/query.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index 5f2b37eb..31252bd3 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -564,6 +565,11 @@ int pacman_query(alpm_list_t *targets) case ALPM_ERR_PKG_NOT_FOUND: pm_fprintf(stderr, ALPM_LOG_ERROR, _("package '%s' was not found\n"), strname); + if(!config->op_q_isfile && access(strname, R_OK) == 0) { + pm_fprintf(stderr, ALPM_LOG_WARNING, + _("'%s' is a file, you might want to use %s."), + strname, "-p/--file"); + } break; default: pm_fprintf(stderr, ALPM_LOG_ERROR, -- cgit v1.2.3-24-g4f1b