Skip to content

Added option whether to show terminal reuse alert - #44461

Merged
Dirk Bäumer (dbaeumer) merged 6 commits into
microsoft:masterfrom
oriash93:oriash93/42993
Jun 7, 2018
Merged

Dirk Bäumer (dbaeumer) merged 6 commits into
microsoft:masterfrom
oriash93:oriash93/42993

Conversation

@oriash93

Copy link
Copy Markdown
Contributor

Allow user to disable "Terminal will be reused by tasks, press any key to close it" message.

fixes #42993

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Feb 27, 2018 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The terminal.integrated namespace currently doesn't have anything related to tasks/debug in it AFAIK. Dirk Bäumer (@dbaeumer) is there a tasks settings namespace?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, everything in a tasks.json is basically a setting. So whether the message is shown or not should be a task settings and a global setting in the tasks.json.

The corresponding schema for this is here: https://github.com/Microsoft/vscode/blob/master/src\vs\workbench\parts\tasks\electron-browser\jsonSchema_v2.ts#L7

@oriash93

Copy link
Copy Markdown
Contributor Author

I hope I got it right this time.

@dbaeumer Dirk Bäumer (dbaeumer) added this to the March 2018 milestone Mar 1, 2018
@dbaeumer

Copy link
Copy Markdown
Member

I looked at the PR and it goes into the right direction. Since tasks have already a presentation property I opt to include it there and not make it a first level attribute. Something:

"presentation": {
    ....
    "reuseMessage": boolean
}

The default should be true although not a falsify value. But it makes more sense then negating the key.

And you only need to adopt the V2 schema since the presentation attribute is only supported on V2.

@oriash93

Copy link
Copy Markdown
Contributor Author

Dirk Bäumer (@dbaeumer), I force-pushed the whole branch, but take a look at the last commit.

@dbaeumer

Copy link
Copy Markdown
Member

Code looks OK to me. Can you add a test to ensure the configuration is passed correctly.

@oriash93

Copy link
Copy Markdown
Contributor Author

Dirk Bäumer (@dbaeumer) I did the same as with "focus" property in configuration.test.ts.

@dbaeumer

Copy link
Copy Markdown
Member

Ori A (@oriash93) I need to push this to Mai. I was extremely busy with other things in April. Sorry for that.

@dbaeumer

Copy link
Copy Markdown
Member

Sorry for moving it again. I will promise to look into it first thing in June.

@dbaeumer
Dirk Bäumer (dbaeumer) merged commit f3966af into microsoft:master Jun 7, 2018
@dbaeumer

Copy link
Copy Markdown
Member

I merged in the PR however I will tweak it a little. Mostly rename reuseMessage to showReuseMessage.

Dirk Bäumer (dbaeumer) added a commit that referenced this pull request Jun 7, 2018
@oriash93
Ori A (oriash93) deleted the oriash93/42993 branch June 7, 2018 15:02
@gwk

Copy link
Copy Markdown

Is this available in the latest insiders build? I can't seem to get it to work but maybe I'm missing something.

@dbaeumer

Copy link
Copy Markdown
Member

I should be in today's insider.

@buggymcbugfix

Copy link
Copy Markdown

Has this not landed in the current release version yet? I'm getting "Property message is not allowed" for "reuseMessage".

@dbaeumer

Copy link
Copy Markdown
Member

The property name is "showReuseMessage"

@umrashrf

Copy link
Copy Markdown
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "clean",
            "type": "shell",
            "windows": {
                "options": {
                    "shell": {
                        "executable": "cmd.exe",
                        "args": [
                            "/d", "/c"
                        ]
                    }
                },
                "command": "del /S /Q *.pyc *.log"
            },
            "presentation": {
                "showReuseMessage": false,
            }
        }
    ]
}

@rustyx

rustyx commented Jul 12, 2019

Copy link
Copy Markdown

Dirk Bäumer (@dbaeumer) so this just hides the message "Press any key to close the terminal.", but user still has to press a key to reveal their terminal??

@dbaeumer

Copy link
Copy Markdown
Member

rustyx you can still set presentation.reveal to 'never' which will not bring the terminal to the front.

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow user to disable "Terminal will be reused by tasks, press any key to close it" message.

9 participants