diff options
-rw-r--r-- | src/pacman/conf.h | 3 | ||||
-rw-r--r-- | src/pacman/pacman.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h index 3ba49eae..c2ed1cac 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -128,7 +128,8 @@ enum { /* Long Operations */ enum { - OP_NOCONFIRM = 1000, + OP_LONG_FLAG_MIN = 1000, + OP_NOCONFIRM, OP_CONFIG, OP_IGNORE, OP_DEBUG, diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 0ba357bb..f4856924 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -947,7 +947,12 @@ static int parseargs(int argc, char *argv[]) result = parsearg_global(opt); if(result != 0) { /* global option parsing failed, abort */ - pm_printf(ALPM_LOG_ERROR, _("invalid option\n")); + if(opt < OP_LONG_FLAG_MIN) { + pm_printf(ALPM_LOG_ERROR, _("invalid option '-%c'\n"), opt); + } else { + pm_printf(ALPM_LOG_ERROR, _("invalid option '--%s'\n"), + opts[option_index].name); + } return result; } } |