Repository navigation
feat(herdr): stop prompting for a tab name on every new tab - #212
Open
ipproyectosysoluciones wants to merge 1 commit into
Open
ipproyectosysoluciones wants to merge 1 commit into
ipproyectosysoluciones wants to merge 1 commit into
Conversation
`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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Sets
ui.prompt_new_tab_name = falsein 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) andherdr 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 checkreads~/.config/herdr/config.toml(checked with a temporaryHOME, so nothing local was touched):config: okconfig: 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_cwddefaults tofollow. So a tab opened from$HOMEshows the username, and the project name only appears once youcdinto 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 inGentlemanZsh/.zshrc, hookingchpwd_functions, using onlyjq— 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.