zellij-org / zellij

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

Numbers in tab name cause confusion when tabs created earlier are closed #3709

Open srgsanky opened 1 month ago

srgsanky commented 1 month ago

Problem: Say you open 5 tabs. Each of them get a number in their name.

Tab #1 | Tab #2 | Tab #3 | Tab #4 | Tab #5

Now if you close the third tab, the numbering and the keybinding to access them are out of sync and cause confusion. We have to use 3 and 4 to access Tab #4 and Tab #5 respectively.

Tab #1 | Tab #2 | Tab #4 | Tab #5

Solution suggestions:

  1. Avoid adding number to the tab name. Instead show the command name or provide a random name similar to the session name.
  2. Rename the tab with the new order of tabs.
WarFox commented 2 weeks ago

Linking a related discussion here https://github.com/zellij-org/zellij/discussions/2889

WarFox commented 2 weeks ago

would be great to have some form of templating system for tab names

for example:

tab-name = {tab-order-number}. {current-directory}
tab-name = Tab {tab-order-number}
tab-name = {tab-order-number}-tab

etc