mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-10 14:30:03 +00:00
make comspec setting optional - fixes #4143
This commit is contained in:
parent
41a53a3e8e
commit
d3498a6a46
@ -263,6 +263,7 @@ export class ConfigService {
|
|||||||
config.version = 1
|
config.version = 1
|
||||||
}
|
}
|
||||||
if (config.version < 2) {
|
if (config.version < 2) {
|
||||||
|
config.profiles ??= []
|
||||||
if (config.terminal?.recoverTabs !== undefined) {
|
if (config.terminal?.recoverTabs !== undefined) {
|
||||||
config.recoverTabs = config.terminal.recoverTabs
|
config.recoverTabs = config.terminal.recoverTabs
|
||||||
delete config.terminal.recoverTabs
|
delete config.terminal.recoverTabs
|
||||||
|
@ -15,6 +15,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
showBuiltinProfiles: true,
|
showBuiltinProfiles: true,
|
||||||
environment: {},
|
environment: {},
|
||||||
profiles: [],
|
profiles: [],
|
||||||
|
setComSpec: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,13 @@ export class Session extends BaseSession {
|
|||||||
...this.config.store.terminal.environment || {},
|
...this.config.store.terminal.environment || {},
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hostApp.platform === Platform.Windows) {
|
if (this.hostApp.platform === Platform.Windows && this.config.store.terminal.setComSpec) {
|
||||||
|
for (const k of Object.keys(env)) {
|
||||||
|
if (k.toUpperCase() === 'COMSPEC') {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||||
|
delete env[k]
|
||||||
|
}
|
||||||
|
}
|
||||||
env.COMSPEC = this.bootstrapData.executable
|
env.COMSPEC = this.bootstrapData.executable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,3 +158,12 @@ h3.mb-3 Terminal
|
|||||||
[(ngModel)]='config.store.terminal.warnOnMultilinePaste',
|
[(ngModel)]='config.store.terminal.warnOnMultilinePaste',
|
||||||
(ngModelChange)='config.save()',
|
(ngModelChange)='config.save()',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
.form-line(*ngIf='hostApp.platform === Platform.Windows')
|
||||||
|
.header
|
||||||
|
.title Set Tabby as %COMSPEC%
|
||||||
|
.description Allows opening .bat files in tabs, but breaks some shells
|
||||||
|
toggle(
|
||||||
|
[(ngModel)]='config.store.terminal.setComSpec',
|
||||||
|
(ngModelChange)='config.save()',
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user