zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.6k stars 651 forks source link

Get Tab name (via env or cli query) #3090

Open tennox opened 9 months ago

tennox commented 9 months ago

I'd like to know the current tab title - I found these:

❯ export | rg -i zellij
ZELLIJ 0
ZELLIJ_PANE_ID 10
ZELLIJ_SESSION_NAME unflappable-ukulele #lol
❯ zellij action query-tab-names
Tab #1
Test Tab Name

But no way to know which tab I'm in, so I don't see a way currently.

Ideas

zellij action query-tab-name
ZELLIJ_TAB_ID 1
ZELLIJ_TAB_NAME Test Tab Name

Can PR, if I get a go & guidance which way to go :tipping_hand_man:

Jedsek commented 9 months ago

Oh, agree: bash -c ' zellij action query-tab-names | sed -n "$(($ZELLIJ_TAB_ID + 1))p" '

bschucha commented 1 month ago

Would love to have this feature.