mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 07:43:39 -05:00
Add completion for pass entries
@@ -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
|
### [BASH] Custom trigger-less completion
|
||||||
|
|
||||||
If you want to remove the `**` trigger just for certain completions, you can achieve this like so:
|
If you want to remove the `**` trigger just for certain completions, you can achieve this like so:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
_fzf_complete_ssh_notrigger() {
|
_fzf_complete_ssh_notrigger() {
|
||||||
FZF_COMPLETION_TRIGGER='' _fzf_host_completion
|
FZF_COMPLETION_TRIGGER='' _fzf_host_completion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user