stig
stig copied to clipboard
Can't focus tab by title in the rcfile: No tab with matching title
tab --focus <title> in the rcfile generates error No tab with matching title: <title>, no matter if the title is explicit (tab --title) or automatically generated. The command works in the TUI, though.
I have this initial rcfile:
# default tabs
tab ls --sort status,!progress all
tab ls --sort !ratio complete
tab ls --sort status,!progress incomplete
tab ls --sort !progress downloading
tab ls --sort !ratio uploading
tab ls stopped
tab --focus all
and when I run the TUI, I get this error:
No tab with matching title: 'all'
If I comment out tab --focus all and run it in the TUI, with :tab --focus all, it focuses the all tab.
Thanks. Confirmed.
This one may be tricky to fix, though. I'll have to investigate.
Of course, it can be worked around using the tab number position, in this case, tab --focus 1
I was just reviewing the issues I had opened, checking if there wasn't any that needed closing, and discovered that this issue doesn't happen if I run tab --focus title from within the TUI; it only happens when tab --focus in is in the rc file.
Yup. It's because everything is running asynchronoulsy.
tab ls foo opens a tab, runs ls foo in it and returns immediately while ls foo is running in the background.
After the command completed, the tab title is set to name~foo.
Before the command completed, all the titles are still unset.
This is definitely a bug, but I have no idea how to fix it.
Thanks for the explanation !
I'd say this is a really minor bug. I ended up finding it better to focus by number.