Documentation error for -G API flag
Created by: petsam
G flag and possibly others about branch, are supposed to be used in conjuction with -a (API). In the help intro, they are not clear or mention this, neither in the Summary nor in the Sections. This led me to run a not existed flag, instead of getting the Branch name. And helped uncover another bug. Expected layout should be all API sub-flags to be under the API section of help and to be clear they need to be run together with -a I remember other programs handle it like this.
$ pacman-mirrors
Version 4.7.6
USAGE:
pacman-mirrors [-h] [-f [NUMBER]] [-i [-d]] [-m METHOD]
[-c COUNTRY [COUNTRY...]] [--geoip] [-l]
[-b BRANCH | -G | -S/-B BRANCH] [-a] [-p PREFIX]
[-P PROTO [PROTO...]] [-R] [-U URL]
[-q] [-t SECONDS] [-v] [-n]
METHODS:
-i, --interactive Generate custom mirrorlist
-f, --fasttrack [NUMBER]
Generate mirrorlist with a number of up-to-date
mirrors. Overrides : --geoip, --method
-c, --country COUNTRY [COUNTRY ...]
Comma separated list of countries, from which mirrors
will be used
--geoip Get current country using geolocation
BRANCH:
-b, --branch {stable,testing,unstable}
Branch name
-G, --get-branch API: Return branch from configuration
-S, -B, --set-branch {stable,testing,unstable}
API: Replace branch in configuration
API:
-a, --api [-p PREFIX][-R][-S/-B|-G BRANCH][-P PROTO [PROTO ...]]
-p, --prefix PREFIX API: Set prefix to : $mnt | /mnt/install
-P, --proto, --protocols {all,http,https,ftp,ftps} [{all,http,https,ftp,ftps} ...]
API: Replace protocols in configuration
-R, --re-branch API: Replace branch in mirrorlist
-U, --url URL API: Replace mirror url in mirrorlist
MISC:
-d, --default INTERACTIVE: Load default mirror file
-h, --help
-l, --list, --country-list
List all available countries
-m, --method {rank,random}
Generation method
-q, --quiet Quiet mode - less verbose output
-t, --timeout SECONDS
Maximum waiting time for server response
-v, --version Print the pacman-mirrors version
-n, --no-mirrorlist Use to skip generation of mirrorlist