Could not configure Broot to open files in specific Kakoune session


I’m trying to configure Broot to open files in specific Kakoune session. Here is excerpt from the docs:

if you need an actual explorer to interact with the editor, you can create a Kakoune script that will 
spawn the tool in question, which should in return send an "edit" command followed by the path 
of the file you selected to the current Kakoune session 
(e.g. echo "eval -client $kak_client edit /path/to/file" | kak -p $kak_session)

If I run this command manually form command line - everything works as expected, the file is successfully opened in specified Kakoune session: echo eval -client client0 edit <path_to_some_file> | kak -p vk. But if I’m adding the same command to Broot config file, the command stops to work. Just nothing happens:

        invocation: edit
        shortcut: e
        key: enter
        apply_to: text_file
        execution: "echo eval -client client0 edit {file} | kak -p vk"
        leave_broot: false

What am I missing here?

Thank you!

The problem seems to be with Broot. Could the problem arise from

leave_broot: false

? What happens if you set

leave_broot: true

(just my 2 cents)

Unfortunately, leave_broot does not affect the issue. It just controls if Broot will exit after innovating edit command or not. execution: "echo eval -client client0 edit {file} | kak -p vk" does not work in both scenarios.

Here’s what I am using in my kakrc

And then kak_open is this:

Also, if you use tmux, be sure to check my tmux + broot specific config