diff --git a/Examples-(completion).md b/Examples-(completion).md index 846a5c7..b2312ce 100644 --- a/Examples-(completion).md +++ b/Examples-(completion).md @@ -50,11 +50,24 @@ _fzf_complete_git_post() { } ``` +### [ZSH] [pass](http://www.passwordstore.org/) +```zsh +_fzf_complete_pass() { + _fzf_complete +m -- "$@" < <( + local prefix + prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}" + command find -L "$prefix" \ + -name "*.gpg" -type f | \ + sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' | sort + ) +} +``` + ### [BASH] Custom trigger-less completion If you want to remove the `**` trigger just for certain completions, you can achieve this like so: -``` +```bash _fzf_complete_ssh_notrigger() { FZF_COMPLETION_TRIGGER='' _fzf_host_completion }