m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib/pass.zsh-completion
diff options
context:
space:
mode:
authorBrian Mattern <rephorm@rephorm.com>2012-09-12 22:25:01 -0700
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-13 08:02:11 +0200
commit36a453ed91407dec1bb2215e0a871d23c0645305 (patch)
tree4fc0d48b43d98c618d8de9645b0bdbdce553b57f /contrib/pass.zsh-completion
parentbdc0960d68d2ab6e4f078356092f97ccae15f0b4 (diff)
add edit command to zsh completion
Diffstat (limited to 'contrib/pass.zsh-completion')
-rw-r--r--contrib/pass.zsh-completion9
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
index e0aa7e9..5cf8808 100644
--- a/contrib/pass.zsh-completion
+++ b/contrib/pass.zsh-completion
@@ -19,12 +19,13 @@ _pass () {
(( $+functions[_pass_cmd_$cmd] )) && _pass_cmd_$cmd
else
- _values : \
+ _values 'command' \
"init[Initialize new password storage]" \
"ls[subfolder List names of passwords]" \
"show[Decrypt and print a password]" \
"insert[Insert a new password]" \
"generate[Generate a new password using pwgen]" \
+ "edit[Edit a password with \$EDITOR]" \
"rm[Remove the password]" \
"push[push the latest changes using git-push(1)]" \
"pull[pull the latest changes using git-pull(1)]" \
@@ -49,6 +50,11 @@ _pass_cmd_show () {
#'::pass id:_files -W ~/.password-store -g "*.gpg(|.*)(-.)"'
}
+_pass_cmd_edit () {
+ _arguments : \
+ '::edit:_get_stored_pwd'
+}
+
_pass_cmd_insert () {
_arguments : \
"-n[no console output]" \
@@ -70,4 +76,5 @@ _pass_cmd_rm () {
_get_stored_pwd () {
compadd `find ~/.password-store \( -name .git -o -name .gpg-id \) -prune -o -type f -print | sed 's#.*\.password-store*.##'| sed 's#\.gpg##' | sort`
+
}