FS#37118 - Make pacman -h output more informative
Attached to Project:
Pacman
Opened by cfr (cfr42) - Sunday, 29 September 2013, 01:15 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 30 May 2018, 04:20 GMT
Opened by cfr (cfr42) - Sunday, 29 September 2013, 01:15 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 30 May 2018, 04:20 GMT
|
Details
Description:
This request is being filed at the suggestion of Allan (https://bbs.archlinux.org/viewtopic.php?pid=1330806#p1330806) following my suggestion in that thread (https://bbs.archlinux.org/viewtopic.php?pid=1330801#p1330801). It would be helpful if the output from pacman -h could say a couple of words about what each operation is for. For example, for -Q it isn't obvious that "query" means locally installed packages and not the database of available packages. This is obvious when you look at the expanded help with -Qh but you need to know it is -Q you want first. Similarly, it is not at all obvious that "sync" is the right operation if I want to search for a package. I think the more detailed help (pacman -{Q,S,D,R,U,T}h) is really clear but the initial help from pacman -h could be slightly more informative. Obviously the man page covers this in great detail but for a quick reminder for people getting used to the flags, I think just a couple of words explaining each operation would be really helpful. Here is some suggested wording (which I'm sure could be improved). I'm sorry I couldn't figure out how to put this into the functions in pacman.c to provide a patch: usage: pacman <operation> [...] operations: pacman {-h --help} pacman {-V --version} pacman {-D --database} <options> <package(s)> modify database of installed packages pacman {-Q --query} [options] [package(s)] query database of installed packages pacman {-R --remove} [options] <package(s)> remove or uninstall packages pacman {-S --sync} [options] [package(s)] search or update database of available packages install or update packages pacman {-T --deptest} [options] [package(s)] check dependencies pacman {-U --upgrade} [options] <file(s)> install or update packages from local files use 'pacman {-h --help}' with an operation for available options |
This task depends upon
or perhaps have the -h switch just as an alias to man!
I think -h is helpful myself. If you have read the wiki or read the man page but are just getting used to pacman and need reminding about which thing does what, it is a lot easier to use -h than have to find the information in the man page. Just the same as checking which flag you want to use with -D or whatever. (I give this as an example because I rarely use -D so need -Dh when I do so.)
I think this would make pacman a lot easier to get used to for new users. Moreover, Allan said it would be easy to implement so I take it that the resources necessary to make it a bit easier for new users are pretty minimal. In which case, it seems to me a good idea.
Because it *is* true that yum install <package> is more intuitively obvious than pacman -S <package> or pacman --sync <package>. What am I syncing? I don't have the package to sync yet. And who knew syncing is what you do to search for a package (as opposed to querying which sounds a lot more likely)?
This isn't a complaint about pacman - it is just that there's a learning curve here which can make it seem more arcane and mysterious than it needs to be. And there is a really simple, easy and minimal solution which might help new users a lot while getting in nobody else's way.