diff --git a/Examples-(completion).md b/Examples-(completion).md index 0346e8b..908a18a 100644 --- a/Examples-(completion).md +++ b/Examples-(completion).md @@ -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 --------