Open tuxflo opened 3 years ago
Hey!
If you have a look at the bottom of the file, you'll notice that we declare the completion for the specific docker
command:
# v--- here
[ -n "$BASH" ] && complete -F _fzf_complete_docker -o default -o bashdefault docker
You'd need to add a new completion function, and declare it with complete
for docker-compose
instead of docker
:blush:
I tried to do it but somehow it doesn't work with docker-compose
for me... (but it works if I give it any other name... still investigating that)
Actually I was wrong, it turns out I didn't even properly understand how all of that was working.
You need to add a function like this, and this should work:
_fzf_complete_docker-compose() {
ARGS="$@"
if [[ $ARGS == 'docker-compose'* ]]; then
_fzf_complete "--multi --reverse" "$@" < <(
docker-compose ps
)
fi
}
You don't even need the complete
stuff that I was talking about.
Hi, at first thanks for the nice plugin it seems to work fine so far. In my current project I have a lot to do with docker-compose and I thought I could extend the plugin to support docker-compose too. I tried to add
to get the output of
docker-compose ps
as a fzf preview but it's not working. It looks like the custom autocomplete isn't triggered at all (**<TAB>
generates the normal file autocompletion list).Any ideas on how to fix that?