Closed Mudskipper875 closed 2 years ago
Awesome. Thanks a lot for your contribution @Mudskipper875
Just one remark for the synopsis section:
You can either do: pacseek whatever
to search immediately (that's like the "old" way before it and flags at all. I kept it for backwards compatibility)
or if you want to use any options you'd need to use -s
for providing a search term. (f.e. pacseek -u whatever
won't work currently)
So it should probably something like this instead 🤔
SYNOPSIS
pacseek [search-term]
pacseek [options] [-s search-term]
But let me think about it first, I might want to change this behavior so that pacseek [options] [search-term]
is actually possible.
Any suggestions/feedback on this is welcome 😉
Okay. Let me know what you decide and I will make the changes 👍.
-s
option is not provided, the last argument is always taken as the search term.
pacseek -r [repo] [search-term]
-r
and -s
options when either the -u
or -i
options are provided.
pacseek -i -r [repo] -s [search-term] -m
- Consider only the -i
and -m
options.-u
or -i
options are used together, consider only the last argument and ignore the other.
pacseek -u -i
- ignore -u
pacseek -ami
Thanks @Mudskipper875
Ok, I've changed things a bit now. Basically we go with the getopt style.
Usage: pacseek [OPTION] [SEARCH-TERM]
-r Limit searching to a comma separated list of repositories
-s Search-term
-a ASCII mode
-m Monochrome mode
-u show upgrades after startup
-i show installed packages after startup
Examples:
pacseek -r core,extra linux
-> Searches for "linux" in the "core" and "extra" repository
pacseek -ui
-> Show installed packages and a list of upgradeable packages
pacseek pacseek
-> Searches for "pacseek" in all repositories
It's pretty much as you suggest except of:
u
and i
will work together. I made sure it first completes the install search and then the updates (it's probably questionable if that is useful at all, but ok)u
or i
are used in combination with a search term, the term take precedence so the others will be ignoredIn theory we could get rid of the -s
option altogether, but I'll just leave it in for the moment (for the case that some users are using that)
Nice work! 😁👍
Resolves #15
(the man page can be previewed by running
man doc/pacseek.1
)