summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-03-31 11:50:43 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-03-31 11:50:43 +0200
commit0489f6a09030a0f034fff4b0294ed7eec276439e (patch)
tree2629f15682728ad605de87dec5be5cd236174ccb
parenta381b3fd5478e2b3ee9710fcf529f7eef7b71352 (diff)
parent3b54d45cd9c5c4be3f49e16a3790f4b800030de1 (diff)
downloadqutebrowser-0489f6a09030a0f034fff4b0294ed7eec276439e.tar.gz
qutebrowser-0489f6a09030a0f034fff4b0294ed7eec276439e.zip
Merge remote-tracking branch 'origin/pr/7068'
-rw-r--r--[-rwxr-xr-x]misc/userscripts/qute-pass7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass
index 76a82e9c3..f410802c8 100755..100644
--- a/misc/userscripts/qute-pass
+++ b/misc/userscripts/qute-pass
@@ -77,6 +77,8 @@ argument_parser.add_argument('--password-store', '-p',
help='Path to your pass password-store (only used in pass-mode)', type=expanded_path)
argument_parser.add_argument('--mode', '-M', choices=['pass', 'gopass'], default="pass",
help='Select mode [gopass] to use gopass instead of the standard pass.')
+argument_parser.add_argument('--prefix', type=str,
+ help='Search only the given subfolder of the store (only used in gopass-mode)')
argument_parser.add_argument('--username-pattern', '-u', default=r'.*/(.+)',
help='Regular expression that matches the username')
argument_parser.add_argument('--username-target', '-U', choices=['path', 'secret'], default='path',
@@ -132,7 +134,10 @@ def find_pass_candidates(domain, unfiltered=False):
candidates = []
if arguments.mode == "gopass":
- all_passwords = subprocess.run(["gopass", "list", "--flat" ], stdout=subprocess.PIPE).stdout.decode("UTF-8").splitlines()
+ gopass_args = ["gopass", "list", "--flat"]
+ if arguments.prefix:
+ gopass_args.append(arguments.prefix)
+ all_passwords = subprocess.run(gopass_args, stdout=subprocess.PIPE).stdout.decode("UTF-8").splitlines()
for password in all_passwords:
if unfiltered or domain in password: