Skip to content

feat(herdr): stop prompting for a tab name on every new tab - #212

Open
ipproyectosysoluciones wants to merge 1 commit into
Gentleman-Programming:mainfrom
ipproyectosysoluciones:feat/herdr-no-tab-name-prompt
Open

ipproyectosysoluciones wants to merge 1 commit into
Gentleman-Programming:mainfrom
ipproyectosysoluciones:feat/herdr-no-tab-name-prompt

Conversation

@ipproyectosysoluciones

Copy link
Copy Markdown

What

Sets ui.prompt_new_tab_name = false in the Herdr config the installer copies to ~/.config/herdr/config.toml.

Why

With the default (true), every new tab opens a name prompt. Dismissing it leaves the automatic label — the directory the tab was created in, or a number when that name is already taken — which is what most people keep anyway. So it is one dialog per tab, for a name that gets replaced by the automatic one.

Naming a tab on purpose is unaffected: prefix+shift+t (keys.rename_tab) and herdr tab rename <id> <label> keep working, and Herdr keeps a renamed tab renamed (its changelog: "Default numbered tabs now stay auto-named when you keep or rename them back to their numeric label").

Verification

herdr config check reads ~/.config/herdr/config.toml (checked with a temporary HOME, so nothing local was touched):

  • with this exact file → config: ok
  • with an unknown key added to the same file → config: issues found / unknown config key …

So the key is recognised by the current version (0.9.1) and the check really reads that path.

Related, offered as a separate follow-up

Herdr labels a new tab from the directory where it is created (a number if that name is taken); terminal.new_cwd defaults to follow. So a tab opened from $HOME shows the username, and the project name only appears once you cd into it.

A small shell hook can keep the tab in sync with the current directory and leave a manually renamed tab alone. I have one working and verified end to end (real tabs, real cd): about 30 lines in GentlemanZsh/.zshrc, hooking chpwd_functions, using only jq — which the template already installs. Happy to send it as its own PR rather than mixing it into this one-line config change, or to drop it if it is not the kind of thing the template should carry.

`ui.prompt_new_tab_name` defaults to true in Herdr, so every new tab opens a
name prompt. Dismissing it leaves the automatic label -- the directory the tab
was created in, or a number when that name is already taken -- which is what
most people keep anyway.

Setting it to false opens tabs straight away. Naming a tab on purpose is still
available: `prefix+shift+t` (`keys.rename_tab`) or `herdr tab rename <id> <label>`.

Verified with `herdr config check` against this exact file (config: ok) and
against the same file with an unknown key added (issues found), so the key is
both recognised by the running version and actually read from
`~/.config/herdr/config.toml`.
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.

1 participant