diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-09-08 02:06:57 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-09-08 02:06:57 +0200 |
commit | 00e44ed94b0e40345492bd513066ea2c50778c27 (patch) | |
tree | db9637fc5fb28364cf81a275d2ec21075f456a13 /bash-completion/pass-zsh-completion | |
parent | a6129c9e45451e8c4082eee897ff1a94c1fe1bbd (diff) |
Move completion files to contrib.
Diffstat (limited to 'bash-completion/pass-zsh-completion')
-rw-r--r-- | bash-completion/pass-zsh-completion | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/bash-completion/pass-zsh-completion b/bash-completion/pass-zsh-completion deleted file mode 100644 index bc23356..0000000 --- a/bash-completion/pass-zsh-completion +++ /dev/null @@ -1,72 +0,0 @@ -#compdef pass - -# This file is under the GPLv2+ license. -# Heavily based on http://zsh.sf.net/Guide/zshguide06.html#l177 -# And Frédéric Perrin article http://tar-jx.bz/notes/zsh-completion.html -# Johan Venant, September 2012 - - -_pass () { - local cmd - if (( CURRENT > 2)); then - cmd=${words[2]} - # Set the context for the subcommand. - curcontext="${curcontext%:*:*}:pass-$cmd" - # Narrow the range of words we are looking at to exclude `pass' - (( CURRENT-- )) - shift words - # Run the completion for the subcommand - (( $+functions[_pass_cmd_$cmd] )) && _pass_cmd_$cmd - - else - _values : \ - "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]" \ - "rm[Remove the password]" \ - "push[push the latest changes using git-push(1)]" \ - "pull[pull the latest changes using git-pull(1)]" \ - "git[Call git]" \ - "help[Help]" - fi -} - -_pass_cmd_init () { -} - -_pass_cmd_ls () { - _arguments : \ - '::ls:_get_stored_pwd' -} - -_pass_cmd_show () { - _arguments : \ - "-c[put it on the clipboard]" \ - '*::show:_get_stored_pwd' - #'::pass id:_files -W ~/.password-store -g "*.gpg(|.*)(-.)"' -} - -_pass_cmd_insert () { - _arguments : \ - "-n[no console output]" \ - "-m[multiline]" \ - '::show:_get_stored_pwd' -} - -_pass_cmd_generate () { - _arguments : \ - "-n[no symbols]" \ - "-c[put password on the clipboard]" \ - '::show:_get_stored_pwd' -} - -_pass_cmd_rm () { - _arguments : \ - '::ls:_get_stored_pwd' -} - -_get_stored_pwd () { - compadd `find ~/.password-store \( -name .git -o -name .gpg-id \) -prune -o -print | sed 's#.*/.password-store/\?##' | sed 's#\.gpg##' | sort` -} |