From 7491c3119f3a7911341e33c98684213b0dddd6fa Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 27 Jan 2023 23:14:29 +0100 Subject: [PATCH] fixed #7841 - clear SSH service messages by default --- tabby-ssh/src/components/sshSettingsTab.component.pug | 8 ++++++++ tabby-ssh/src/components/sshTab.component.ts | 5 +++++ tabby-ssh/src/config.ts | 1 + 3 files changed, 14 insertions(+) diff --git a/tabby-ssh/src/components/sshSettingsTab.component.pug b/tabby-ssh/src/components/sshSettingsTab.component.pug index fd50f44f..2ff88f71 100644 --- a/tabby-ssh/src/components/sshSettingsTab.component.pug +++ b/tabby-ssh/src/components/sshSettingsTab.component.pug @@ -61,4 +61,12 @@ h3 SSH (ngModelChange)='config.save()' ) +.form-line + .header + .title(translate) Clear terminal after connection + toggle( + [(ngModel)]='config.store.ssh.clearServiceMessagesOnConnect', + (ngModelChange)='config.save()', + ) + .alert.alert-info(translate) SSH connection management is now done through the "Profiles & connections" tab diff --git a/tabby-ssh/src/components/sshTab.component.ts b/tabby-ssh/src/components/sshTab.component.ts index 061f6ca9..17a0b54a 100644 --- a/tabby-ssh/src/components/sshTab.component.ts +++ b/tabby-ssh/src/components/sshTab.component.ts @@ -199,6 +199,11 @@ export class SSHTabComponent extends BaseTerminalTabComponent { }) await session.start() + + if (this.config.store.ssh.clearServiceMessagesOnConnect) { + this.frontend?.clear() + } + this.session?.resize(this.size.columns, this.size.rows) } diff --git a/tabby-ssh/src/config.ts b/tabby-ssh/src/config.ts index 8c32ba89..82a35cdc 100644 --- a/tabby-ssh/src/config.ts +++ b/tabby-ssh/src/config.ts @@ -11,6 +11,7 @@ export class SSHConfigProvider extends ConfigProvider { x11Display: null, knownHosts: [], verifyHostKeys: true, + clearServiceMessagesOnConnect: true, }, hotkeys: { 'restart-ssh-session': [],