moson-mo / pacseek

A terminal user interface for searching and installing Arch Linux packages
MIT License
328 stars 9 forks source link

Add man page #16

Closed Mudskipper875 closed 2 years ago

Mudskipper875 commented 2 years ago

Resolves #15

(the man page can be previewed by running man doc/pacseek.1)

moson-mo commented 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 😉

Mudskipper875 commented 2 years ago

Okay. Let me know what you decide and I will make the changes 👍.

Suggestions for changes to pacseek

moson-mo commented 2 years ago

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:

  1. 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)
  2. Search term can either be at the very front or end (but with the instructions we should suggest [option] and then [search-term] I think. Like getopt style.
  3. With u or i are used in combination with a search term, the term take precedence so the others will be ignored

In 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)

Mudskipper875 commented 2 years ago

Nice work! 😁👍