Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[adv_windowlist.pl] Match against /go argument when determining $Q #783

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

madduck
Copy link
Contributor

@madduck madduck commented Sep 4, 2021

I've recently started using go2.pl (a drop-in replacement to go.pl),
which provides the handy /go command to switch windows. Consequently,
I can now do:

/bind meta-s-meta-i command go #irssi

to switch to the window containing the best match for item #irssi.

This patch teaches AWL to read the /bind output for such keybindings
as well, so that $Q works accordingly.

Signed-off-by: martin f. krafft [email protected]

I've recently started using `go2.pl` (a drop-in replacement to `go.pl`),
which provides the handy `/go` command to switch windows. Consequently,
I can now do:

```
/bind meta-s-meta-i command go #irssi
```

to switch to the window containing the best match for item `#irssi`.

This patch teaches AWL to read the `/bind` output for such keybindings
as well, so that `$Q` works accordingly.

Signed-off-by: martin f. krafft <[email protected]>
@ailin-nemui
Copy link
Contributor

ok but why not just bind window goto, which is already supported?

@madduck
Copy link
Contributor Author

madduck commented Sep 4, 2021

@ailin-nemui honestly, I don't know. When I added /go to my configuration in oh-my-goodness-i-do-no-remember-how-long-ago, I don't think /window goto existed. Now, the only thing /go seems to have over /window goto is that it takes the chatnet parameter too, which helps in cases where you've joined the same channel on multiple networks. I only have 2 of those instances left, so maybe it's time to move on? On the other hand, does it hurt to add support, given how simple the patch is?

@ailin-nemui
Copy link
Contributor

my concern is that /go may be using partial matching or another algorithm than Irssi, thus the displayed key binding could be incorrect

@madduck
Copy link
Contributor Author

madduck commented Sep 5, 2021

Since I've found out that window goto will simply cycle through window items that share the same name across different chatnets. It still does not allow me to deterministically go to one specific window item.

Instead of hard-coding go.pl, I suggest that I submit a patch that makes this configurable, default off (and leave window goto always enabled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants