Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasks should have an option to clear the terminal before executing #61592

Closed
alexr00 opened this issue Oct 23, 2018 · 2 comments · Fixed by #63508
Closed

Tasks should have an option to clear the terminal before executing #61592

alexr00 opened this issue Oct 23, 2018 · 2 comments · Fixed by #63508
Assignees
Labels
api api-finalization api-proposal feature-request Request for new features or functionality tasks Task system issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@alexr00
Copy link
Member

alexr00 commented Oct 23, 2018

This clear option can be added into the exiting "presentation" task property and would be called "clear":

	{
		"label": "ExampleTask",
		"type": "shell",
		"command": "echo hello",
		"presentation": {
			"echo": true,
			"reveal": "always",
			"focus": false,
			"panel": "shared",
			"showReuseMessage": true,
			"clear": false
		}	
	}

Added to TaskPresentationOptions:

/**
 * Controls how the task is presented in the UI.
 */
export interface TaskPresentationOptions {
        ….
	/**
	 * Controls whether the terminal is cleared before executing the task.
	 */
	clear?: boolean;
}
@alexr00 alexr00 added feature-request Request for new features or functionality api tasks Task system issues api-proposal labels Oct 23, 2018
@alexr00 alexr00 assigned alexr00 and dbaeumer and unassigned alexr00 Oct 23, 2018
@alexr00 alexr00 added this to the October 2018 milestone Oct 23, 2018
@joaomoreno joaomoreno modified the milestones: October 2018, November 2018 Nov 1, 2018
alexr00 added a commit that referenced this issue Nov 20, 2018
@alexr00 alexr00 added the verification-needed Verification of issue is requested label Dec 5, 2018
@roblourens
Copy link
Member

This doesn't work for me:

{
    "label": "My Task",
    "type": "shell",
    "command": "echo Hello",
    "problemMatcher": [],
    "presentation": {
        "clear": true
    }
}

I run it multiple times and see all the output, the terminal is never cleared.

@roblourens roblourens reopened this Dec 5, 2018
@roblourens roblourens added the verification-found Issue verification failed label Dec 5, 2018
@dbaeumer dbaeumer removed their assignment Dec 6, 2018
@alexr00
Copy link
Member Author

alexr00 commented Dec 6, 2018

Turns out that if the only presentation option set is clear, this doesn't work. Thanks for finding!

@alexr00 alexr00 closed this as completed in b8088e5 Dec 6, 2018
@alexr00 alexr00 removed the verification-found Issue verification failed label Dec 6, 2018
@weinand weinand added the verified Verification succeeded label Dec 6, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization api-proposal feature-request Request for new features or functionality tasks Task system issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants