Open slayer152 opened 2 years ago
Hi,
It is indeed not specified, but completion functions need to use __get_cword_at_cursor_by_ref
to work with fzf-obc.
A typical example on how to start a custom function is to check default ones
bash-4.4$ declare -f _cd
_cd ()
{
local cur prev words cword;
_init_completion || return;
.....
}
That said, a completion as your example will need a post function as for gradle due to the necessity to clean up the result
Hello,
I've been using https://github.com/lincheney/fzf-tab-completion/ but want to try fzf-obc as it supports completion post functions.
Is there a basic example to make a custom completion function work with fzf-obc?
Bash version:
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
After source'ing fzf-obc
When I press
foo <tab-key>
, I don't see the completions using the fzf-filter. I only see the default method of completion of bash.complete -p foo
returnscomplete -F __fzf_obc_wrapper__foo foo
, so fzf-obc seems to be doing something but doesn't show the candidates in fzf.However, when I use it one of the standard linux commands, e.g.
ls -
, then I see thels
options using the fzf window.Am I missing an important step to make fzf-obc work with custom completion functions?
Thanks in advance.