mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 15:53:39 -05:00
Updated Examples (completion) (markdown)
@@ -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
|
||||
--------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user