Add fzf pass completion (from fzf wiki)
This commit is contained in:
parent
32c3f4da1f
commit
7c69a96fd8
1 changed files with 8 additions and 0 deletions
|
@ -63,6 +63,14 @@ _fzf_compgen_dir() {
|
|||
resultcmd="$FZF_ALT_C_COMMAND . $1"
|
||||
eval ${resultcmd}
|
||||
}
|
||||
_fzf_complete_pass() {
|
||||
_fzf_complete +m -- "$@" < <(
|
||||
local prefix
|
||||
prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
|
||||
command fd -t f ".*\.gpg$" "$prefix" \
|
||||
| sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' | sort
|
||||
)
|
||||
}
|
||||
|
||||
# nvim ftw!
|
||||
export EDITOR=nvim
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue