broot icon indicating copy to clipboard operation
broot copied to clipboard

Interact with other tools - allow other tools change current hoverd file

Open theowenyoung opened this issue 3 years ago • 2 comments

Hi, thanks for the great tool!

I would like to know if there are opportunities to interact with other tools.

For example, now I can use broot to open the file in the split window of the editor in tmux ( I use kakoune as the editor )

But I would like that when I switch files in my editor, broot can also switch to the file I am currently editing in parallel.

I need to notice broot to hover {file}

Maybe like:

Start broot:

br --session session_name

Notice broot:

be --session session_name --internal ":hover hello.txt"

theowenyoung avatar Sep 10 '22 14:09 theowenyoung

Did you try https://dystroy.org/broot/remote/

Is there a problem with it ?

broot might be missing a :select verb to select by path...

Canop avatar Sep 10 '22 14:09 Canop

Thanks @Canop , sorry I didn't see that doc, that is exactly what I want.

and yes, it'll be very nice if there is a :select verb.

theowenyoung avatar Sep 10 '22 15:09 theowenyoung

@theowenyoung The new 1.15 version brings a :select verb which may be used to remotely select a file.

For example if you launch broot in the broot directory with br -- --listen test, then you may select an entry with br --send test -c ':select resources'. This works with both absolute and relative paths (and more).

It works only when the path is visible, which means the calling application may want to select the parent before, and/or remove root trimming when there are many files.

Please tell me whether it solves the problem for you.

Canop avatar Sep 24 '22 19:09 Canop

Thanks @Canop , This solved my problem perfectly! Thank you so much for your time!

theowenyoung avatar Sep 24 '22 19:09 theowenyoung