Skip to content

kitty @ focus-tab --match index:2 #3708

@daniel-pfeiffer

Description

@daniel-pfeiffer

Since the only information documented as addable to a tab-title is the index, the above syntax would be very handy!

So, may I suggest adding/adapting these lines to boss.match_tabs? Untested, and not sure about the 2nd line, the like of which I searched for on StackOverflow. Apparently something intuitive like self.all_tabs[exp - 1] would have made people's lives too easy. This would also need error handling, if exp is out of range:

        elif field == 'index':
            next((tab for i, tab in enumerate(self.all_tabs) if i + 1 == exp), None)
            if tab:
                yield tab
                found = True

Btw: Trying to build, I got harfbuzzed :-o and replacing boss.pyc by a modified boss.py has no effect. Actually the whole .local/kitty.app/lib/python3.9/kitty directory seems superfluous (removed it and kitty still works.) Not sure what magic that is.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions