aboutsummaryrefslogtreecommitdiff
path: root/conkerorrc
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2016-10-12 11:07:32 +0200
committerKarel Kočí <karel.koci@nic.cz>2016-10-12 11:08:56 +0200
commit62a5bb5a67b0392048b47fec32ac8b17369acd89 (patch)
tree9a7c6c2b0d6cf8878300f567ce7bf57d644e240c /conkerorrc
parent7aad49a38f827291cdd0c6849c1ed5277bd925b8 (diff)
downloadmyconfigs-62a5bb5a67b0392048b47fec32ac8b17369acd89.tar.gz
myconfigs-62a5bb5a67b0392048b47fec32ac8b17369acd89.tar.bz2
myconfigs-62a5bb5a67b0392048b47fec32ac8b17369acd89.zip
Fix conkeror password selection
Diffstat (limited to 'conkerorrc')
-rw-r--r--conkerorrc7
1 files changed, 3 insertions, 4 deletions
diff --git a/conkerorrc b/conkerorrc
index afe3a48..1ede2ba 100644
--- a/conkerorrc
+++ b/conkerorrc
@@ -132,7 +132,7 @@ function pass_chose_account(I) {
I.window.minibuffer.message("pass: No accounts detected for domain: " + pass_domain);
pass_account = "";
return;
- // Note that accs has empty line at end so all this is bupped by one
+ // Note that accs has empty line at end so all this is bumped by one
} else if (accs.length == 2) {
pass_account = accs[0].replace(/\.\//, '').replace(/\.gpg$/, '');
} else {
@@ -153,7 +153,7 @@ function pass_chose_account(I) {
function pass_get_password(I) {
var domain = yield get_domain(I);
- if (pass_account == "" || pass_domain != domain) {
+ if (pass_account == "" || String(pass_domain) != String(domain)) {
yield pass_chose_account(I);
}
if (pass_account != "" && I.buffer.focused_element) {
@@ -161,6 +161,7 @@ function pass_get_password(I) {
dumpln(res.stdout);
I.buffer.focused_element.value = res.stdout;
I.window.minibuffer.message("pass: Inserted password for account: " + pass_account);
+ pass_account = ""; // remove selected account so we can select new one
}
};
@@ -173,8 +174,6 @@ function pass_get_name(I) {
}
};
-// TODO iterate trough all pass to chose account
-
interactive("pass-get-name", "Choses account for to be loged as. As result name of account is outputed.", pass_get_name);
interactive("pass-get-password", "Receives password from pass for currently selected account.", pass_get_password);
/////////////////////////////////////////////////////////////////////////////////