Created
April 5, 2014 14:51
-
-
Save f440/9992963 to your computer and use it in GitHub Desktop.
Incremental search for pass by zaw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- sh -*- | |
# [Pass](http://www.zx2c4.com/projects/password-store/) | |
# the standard unix password manager | |
# [zaw](https://github.com/zsh-users/zaw) | |
# zsh anything.el-like widget | |
function zaw-src-pass() { | |
candidates=("${(ps:\n:)$(builtin cd ~/.password-store >/dev/null ; find . -type f ! -name .gpg-id | sed -e 's/\.\/\(.*\).gpg$/\1/')}") | |
actions=("zaw-callback-pass-append-to-buffer") | |
act_descriptions=("pass" "append to edit buffer") | |
} | |
zaw-register-src -n pass zaw-src-pass | |
function zaw-callback-pass-append-to-buffer() { | |
BUFFER="pass show -c $1" | |
zle accept-line | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment