monocle icon indicating copy to clipboard operation
monocle copied to clipboard

Start search on the current pane cwd location

Open fungos opened this issue 1 year ago • 4 comments
trafficstars

If I have 3 panes, each with a different directory set with cwd, when I start monocle to search, it seems to be using only the last cwd in my layout file. Even if I change pane, it will keep the last cwd as the search path. Ideally, it would be able to use the last focused pane's cwd.

fungos avatar Feb 05 '24 21:02 fungos

Any workaround to use the cwd of the current pane ?

ErwonB avatar Apr 25 '24 15:04 ErwonB

Hey umm... isn't this already how it is in the latest Zellij and the latest Monocle? That's how it works for me...

imsnif avatar Apr 25 '24 15:04 imsnif

For me, it's always using the directory from where I started the zellij session. I'm using zellij 0.40.0 and the latest monocle.wasm

Edit : I think I got it, I wasn't closing the monocle floating pane so it didn't refresh with the new cwd

ErwonB avatar Apr 25 '24 15:04 ErwonB

Edit : I think I got it, I wasn't closing the monocle floating pane so it didn't refresh with the new cwd

This issue I have with this is that one has to constantly close the existing floating pane when switching between directories.

I would like to be able to open a floating pane with Monocle (helps me focus on the search better, and fixes the issue that when --in-place is used on a small pane, the Monocle window does scroll to show all matches), search for a file and open the file in a new embedded pane and switch focus to that pane, and automatically close the floating pane with the Monocle plugin running. This would allow to afterwards switch to another directory, and repeat, without having to close the running Monocle instance. I basically need something like --close-after-search flag.

@imsnif Am I right that this use case is currently not possible?

Adda0 avatar Nov 03 '24 16:11 Adda0