m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Updated Examples (completion) (markdown)

Junegunn Choi
2016-01-29 01:34:15 +09:00
parent 12031a9b10
commit 93535db0de

@@ -29,6 +29,24 @@ zsh will automatically pick up the command using the naming convention but in ba
[ -n "$BASH" ] && complete -F _fzf_complete_doge -o default -o bashdefault doge
```
### Post-processing
If you need to post-process the output from fzf, define `_fzf_complete_COMMAND_post` as follows.
```sh
_fzf_complete_foo() {
_fzf_complete "--multi --reverse --header-lines=3" "$@" < <(
ls -al
)
}
_fzf_complete_foo_post() {
awk '{print $NF}'
}
[ -n "$BASH" ] && complete -F _fzf_complete_foo -o default -o bashdefault foo
```
Examples
--------