mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 22:44:55 +00:00
allow specifying a custom startup directory (fixes #223)
This commit is contained in:
@@ -33,8 +33,12 @@ export class TerminalService {
|
||||
}
|
||||
|
||||
async openTab (shell?: IShell, cwd?: string): Promise<TerminalTabComponent> {
|
||||
if (!cwd && this.app.activeTab instanceof TerminalTabComponent) {
|
||||
cwd = await this.app.activeTab.session.getWorkingDirectory()
|
||||
if (!cwd) {
|
||||
if (this.app.activeTab instanceof TerminalTabComponent) {
|
||||
cwd = await this.app.activeTab.session.getWorkingDirectory()
|
||||
} else {
|
||||
cwd = this.config.store.terminal.workingDirectory || null
|
||||
}
|
||||
}
|
||||
if (!shell) {
|
||||
let shells = await this.shells$.toPromise()
|
||||
|
Reference in New Issue
Block a user