diff --git a/completion/bash-completion b/completion/bash-completion index a6a79518..c0995d36 100644 --- a/completion/bash-completion +++ b/completion/bash-completion @@ -78,7 +78,7 @@ __complete_options() { } __complete_build() { - opts="-h -v -p -c -l -s -t -f" + opts="-h -v -c -l -s -t -f" lopts="--help --verbose --latest --server --resetserver --on-server --force --all" case "${cur}" in @@ -137,7 +137,7 @@ __complete_publish() { } __complete_checkupdates() { - opts="-h -v -p" + opts="-h -v" lopts="--help --verbose --auto --autoonly --commit --gplay" case "${cur}" in -*) @@ -162,14 +162,16 @@ __complete_import() { } __complete_rewritemeta() { - opts="-h -v -p" - lopts="--help --verbose --package" - case "${prev}" in - -p|--package) + opts="-h -v" + lopts="--help --verbose" + case "${cur}" in + -*) + __complete_options + return 0;; + *) __package return 0;; esac - __complete_options } __complete_scanner() { diff --git a/fdroidserver/rewritemeta.py b/fdroidserver/rewritemeta.py index 30dfb6e8..d6f7e23d 100644 --- a/fdroidserver/rewritemeta.py +++ b/fdroidserver/rewritemeta.py @@ -33,17 +33,16 @@ def main(): parser = OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") - parser.add_option("-p", "--package", default=None, - help="Process only the specified package") (options, args) = parser.parse_args() config = common.read_config(options) # Get all apps... - apps = metadata.read_metadata(package=options.package, xref=False) + allapps = metadata.read_metadata(xref=False) + apps = common.read_app_args(args, allapps, False) - if len(apps) == 0 and options.package: - print "No such package" + if len(apps) == 0: + print "No packages to rewrite" sys.exit(1) for app in apps: