mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 15:53:39 -05:00
Updated Examples (completion) (markdown)
@@ -21,9 +21,9 @@ _fzf_complete_doge() {
|
||||
|
||||
The first argument to `_fzf_complete` is the options to fzf. The second argument is the usual arguments passed to the completion function, you can simply pass `"$@"` here.
|
||||
|
||||
You can see that the output of some arbitrary commands (4 echos) are fed into the function using process substitution `< <(...)`. The lines from the output of the enclosed commands become the completion candidates.
|
||||
You can see that the output of some arbitrary commands (4 echos) are fed into the function using process substitution `< <(...)`. The output lines of the enclosed commands become the completion candidates.
|
||||
|
||||
zsh will automatically pick up the command but in bash you have to connect the function to the command using `complete` command.
|
||||
zsh will automatically pick up the command using the naming convention but in bash you have to connect the function to the command using `complete` command.
|
||||
|
||||
```sh
|
||||
[ -n "$BASH" ] && complete -F _fzf_complete_doge -o default -o bashdefault doge
|
||||
|
||||
Reference in New Issue
Block a user