Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
args: Fix bug where you couldn't use --backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Apr 2, 2018
1 parent e82c983 commit 98ab58f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pywal/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_args():
arg.add_argument("--backend", metavar="backend",
help="Which color backend to use. \
Use 'wal --backend' to list backends.",
const="list_backends", type=str, nargs="?", default="wal")
const="list_backends", type=str, nargs="?")

arg.add_argument("--theme", "-f", metavar="/path/to/file or theme_name",
help="Which colorscheme file to use. \
Expand Down Expand Up @@ -104,9 +104,12 @@ def parse_args_exit(parser):
if args.i and args.theme:
parser.error("Conflicting arguments -i and -f.")

if not args.i and not args.theme and not args.R:
if not args.i and \
not args.theme and \
not args.R and \
not args.backend:
parser.error("No input specified.\n"
"--theme, -i or -R are required.")
"--backend, --theme, -i or -R are required.")

if args.r:
reload.colors()
Expand Down

0 comments on commit 98ab58f

Please sign in to comment.