You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However the -h flag is not respected by almost all of the commands:
$ fdroidcl update -h
Downloading https://f-droid.org/repo/index-v1.jar... not modified
$ fdroidcl show -h
show: could not find app with ID '-h'
$ fdroidcl install -h
install: could not find app with ID '-h'
$ fdroidcl uninstall -h
Uninstalling -h
uninstall: could not uninstall -h: not installed
$ fdroidcl download -h
download: could not find app with ID '-h'
$ fdroidcl devices -h
<serialno> - <device>
$ fdroidcl list -h
list: invalid argument
$ fdroidcl defaults -h
defaults: no arguments allowed
$ fdroidcl version -h
version: no arguments allowed
Only search prints out the usage information ... along with every single package it can find, spamming the usage information away with it.
$ fdroidcl search -h
Usage:
-c string
Filter apps by category
-d int
Select apps last updated in the last <n> days; a negative value drops them instead
-i Filter installed apps
-o string
Sort order (added, updated)
-q Print package names only
-u Filter apps with updates
<long list of all available packages>
Version:
$ fdroidcl version
v0.4.0
The text was updated successfully, but these errors were encountered:
https://godoc.org/github.com/pborman/getopt may help. I recall a conversation that this is best practice for presenting options. Should also allow one to not have to put options in a specific order.
There are dozens of third-party packages out there for flag parsing - there really isn't a best practice. I personally prefer sticking with the standard library whenever possible, and it works fine here. The bug here is in my code, not in a library.
The main help has the line
at the bottom of the output.
However the
-h
flag is not respected by almost all of the commands:Only
search
prints out the usage information ... along with every single package it can find, spamming the usage information away with it.Version:
The text was updated successfully, but these errors were encountered: