-
-
Save imiric/db42a73c37015913c11884df1c32271d to your computer and use it in GitHub Desktop.
pass.zsh
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 -*- | |
# | |
# Original plugin: https://gist.github.com/vvicaretti/cb4b2e27dadaf458eb3bc4ac215cf5fd | |
# Changes: | |
# - Made lookup case-insensitive | |
# | |
# [Pass](https://www.passwordstore.org/) | |
# 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 . -not -wholename "./.git*" -type f ! -name .gpg-id -not -path ".git" | sort | sed -e 's/\.\/\(.*\).gpg$/\1/')}") | |
actions=("zaw-callback-pass-append-to-buffer") | |
act_descriptions=("pass" "append to edit buffer") | |
zstyle ':filter-select' case-insensitive yes | |
} | |
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