1
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-08-22 01:01:57 +00:00

Do not auto-open tab if we've started the console and pointed it to open in a specific location

This commit is contained in:
Austin Warren
2019-07-17 17:17:50 -07:00
parent 5679d5edf1
commit 380266a57c

@@ -156,10 +156,18 @@ export default class TerminalModule { // eslint-disable-line @typescript-eslint/
} }
}) })
if (config.store.terminal.autoOpen) { if (config.store.terminal.autoOpen) {
let argv = require('electron').remote.process.argv;
if (argv[0].includes('node')) {
argv = argv.slice(1)
}
if(require('yargs').parse(argv.slice(1))._[0] !== "open"){
app.ready$.subscribe(() => { app.ready$.subscribe(() => {
terminal.openTab() terminal.openTab()
}) })
} }
}
hotkeys.matchedHotkey.subscribe(async (hotkey) => { hotkeys.matchedHotkey.subscribe(async (hotkey) => {
if (hotkey === 'new-tab') { if (hotkey === 'new-tab') {