Change:
Testing a terminal tab title setting your terminal to "foo" to set the name to blank string to, but I would expect it to just use my default from 1.
We discussed this and want to require a title.
I don't mean that blank titles should be allowed. I more meant how do I get back to the default I set in settings after I renamed the terminal, I feel I would expect it to let me delete my custom name and then it would use the default
You can reset the setting by clicking on the gear - is that what you mean?
No I meant is there a way to reset the terminal title to be the value of my setting instead of my custom named one?
We currently don't support going backward like that. I'll appropriately rename this issue for more discussion in October because I also wondered about this and discussed it with
Thanks sorry if I wasn't clear . My suggested UX would just be to have that be the default if you were attempt to have a blank name
oh - yes Brigit caught that case and I fixed it. so if it's set to '' or 'any number of spaces', it'll now show the process name. might've misunderstood what you were saying
But shouldn't it show whatever my setting states the default is rather than just the process name?
Sorry, the difference between our issues is she is talking about the setting I'm talking about the terminal title itself and not the setting. I want a blank rename of a terminal to reset to the value of my setting
I thought your setting was set to ''
confused - you can't set it to blank. we don't allow that
!
So my request is if my setting is and I name a terminal "foo". How do I reset "foo" back to the value of . My suggestion was that if you attempted to submit a blank name that would automatically reset to the value of your setting.
yep the name of this issue now reflects that. we'll see what says about that.
and I discussed it and it makes sense to do this

Discussion:
/** * Sets the terminal name to the provided title or triggers a quick pick <del> * to take user input. </del> <ins> * to take user input. If no title is provided, will reset based to the value indicated * user's configration. </ins> */ <del> rename(title?: string): Promise<void>; </del> <ins> rename(title?: string | 'triggerQuickpick'): Promise<void>; </ins> /** * Triggers a quick pick to change the icon of this terminal.

}); } async run(accessor: ServicesAccessor, resource: unknown) { <del> doWithInstance(accessor, resource)?.rename(); </del> <ins> doWithInstance(accessor, resource)?.rename('triggerQuickpick'); </ins> } });

}); } async run(accessor: ServicesAccessor) { <del> return accessor.get(ITerminalGroupService).activeInstance?.rename(); </del> <ins> return accessor.get(ITerminalGroupService).activeInstance?.rename('triggerQuickpick'); </ins> } }); registerAction2(class extends Action2 {

export function validateTerminalName(name: string): { content: string, severity: Severity } | null { if (!name || name.trim().length === 0) { return { <del> content: localize('emptyTerminalNameError', "A name must be provided."), severity: Severity.Error </del> <ins> content: localize('emptyTerminalNameInfo', "Providing no name will reset it to the default value"), severity: Severity.Info </ins> }; }

} refreshTabLabels(title: string | undefined, eventSource: TitleEventSource): void { <ins> const reset = !title; </ins> title = this._updateTitleProperties(title, eventSource); const titleChanged = title !== this._title; this._title = title; <del> this._labelComputer?.refreshLabel(); </del> <ins> this._labelComputer?.refreshLabel(reset); </ins> this._setAriaLabel(this.xterm?.raw, this._instanceId, this._title); if (this._titleReadyComplete) {

return this._linkManager.registerExternalLinkProvider(this, provider); } <del> async rename(title?: string) { if (!title) { </del> <ins> async rename(title?: string | 'triggerQuickpick') { if (title === 'triggerQuickpick') { </ins> title = await this._quickInputService.input({ value: this.title, prompt: nls.localize('workbench.action.terminal.rename.prompt', "Enter terminal name"), }); } <del> if (title) { this.refreshTabLabels(title, TitleEventSource.Api); } </del> <ins> this.refreshTabLabels(title, TitleEventSource.Api); </ins> } async changeIcon() {

super(); } <del> refreshLabel(): void { this._title = this.computeLabel(this._configHelper.config.tabs.title, TerminalLabelType.Title); </del> <ins> refreshLabel(reset?: boolean): void { this._title = this.computeLabel(this._configHelper.config.tabs.title, TerminalLabelType.Title, reset); </ins> this._description = this.computeLabel(this._configHelper.config.tabs.description, TerminalLabelType.Description); <del> if (this._title !== this._instance.title || this._description !== this._instance.description) { </del> <ins> if (this._title !== this._instance.title || this._description !== this._instance.description || reset) { </ins> this._onDidChangeLabel.fire({ title: this._title, description: this._description }); } } computeLabel( labelTemplate: string, <del> labelType: TerminalLabelType </del> <ins> labelType: TerminalLabelType, reset?: boolean </ins> ) { const templateProperties: ITerminalLabelTemplateProperties = { cwd: this._instance.cwd || this._instance.initialCwd || '',

if (!labelTemplate) { return labelType === TerminalLabelType.Title ? (this._instance.processName || '') : ''; } <del> if (this._instance.staticTitle && labelType === TerminalLabelType.Title) { </del> <ins> if (!reset && this._instance.staticTitle && labelType === TerminalLabelType.Title) { </ins> return this._instance.staticTitle.replace(/[nrt]/g, '') || templateProperties.process?.replace(/[nrt]/g, '') || ''; } const detection = this._instance.capabilities.includes(ProcessCapability.CwdDetection);