MLFlexer / smart_workspace_switcher.wezterm

A smart wezterm workspace switcher plugin inspired by joshmedeski/t-smart-tmux-session-manager
MIT License
48 stars 4 forks source link

Add extra_args for zoxide query command. #22

Closed theherk closed 7 months ago

theherk commented 7 months ago

This allows me to call switch_workspace(" | rg -Fxf ~/.projects") to filter the list further to only those candidates I want to include in the selection, while maintaining the query ordering behavior benefits of using zoxide in the first place. But this could be used for any additional argument somebody wanted to use for the query. Of course, it is likely none or few will find this useful, but it is unobtrusive. If you reject it, I completely understand, but this is useful for me.

As an aside, if you're interested in how I generate this list, I use this script to find all git roots in my projects directory and populate a file that is just a list of these for filtering.

MLFlexer commented 7 months ago

Sorry for the long delay in response, i had a very busy week in uni

I can definitely see how this can be useful, and since once can just omit the function argument and have the old functionality i don't see anything wrong with this :smile:

The only things missing would be updating the README with a configuration example, otherwise it looks good :+1:

theherk commented 7 months ago

The only things missing would be updating the README with a configuration example, otherwise it looks good 👍

I added this in 013efd0; let me know if it is sufficient. I didn't see your requests until now, so this delay was mine. 😄 Thanks for the feedback.

MLFlexer commented 7 months ago

Looks good! Thanks for your contribution!