make qute-pass more informative when no matching pass entry is found
This commit is contained in:
parent
0c0453b8e5
commit
f12cf9931f
|
|
@ -152,7 +152,9 @@ def main(arguments):
|
|||
# Try to find candidates using targets in the following order: fully-qualified domain name (includes subdomains),
|
||||
# the registered domain name and finally: the IPv4 address if that's what the URL represents
|
||||
candidates = set()
|
||||
attempted_targets = []
|
||||
for target in filter(None, [extract_result.fqdn, extract_result.registered_domain, extract_result.ipv4]):
|
||||
attempted_targets.append(target)
|
||||
target_candidates = find_pass_candidates(target, password_store_path)
|
||||
if not target_candidates:
|
||||
continue
|
||||
|
|
@ -162,7 +164,7 @@ def main(arguments):
|
|||
break
|
||||
else:
|
||||
if not candidates:
|
||||
stderr('No pass candidates for URL {!r} found!'.format(arguments.url))
|
||||
stderr('No pass candidates for URL {0!r} found! (I tried {1!r})'.format(arguments.url, attempted_targets))
|
||||
return ExitCodes.NO_PASS_CANDIDATES
|
||||
|
||||
selection = candidates.pop() if len(candidates) == 1 else dmenu(sorted(candidates), arguments.dmenu_invocation,
|
||||
|
|
|
|||
Loading…
Reference in New Issue