-
Notifications
You must be signed in to change notification settings - Fork 62
Added a configuration parameter "actionOnStartingCommandIfThereIsRunningCommand" #78
Conversation
It is "actionOnStartingCommandIfThereIsRunningCommand".
@KalitaAlexey: A suggestion for the setting's name: // If a previous terminal is running, this setting decides which action to take.
// This affects Cargo commands only when `executeCargoCommandInTerminal` is set
// to `true`.
"rust.actionOnExecuteCargoCommand": null, |
@redactedscribe, |
Ah, my mistake. |
Hello @redactedscribe, |
doc/cargo_command_execution.md
Outdated
@@ -75,6 +75,17 @@ The possible values: | |||
* Some object (`{ "RUST_BACKTRACE": 1 }`) | |||
* `null` | |||
|
|||
### Setting An Action To Handle Starting A New Command If There Is Another Running Command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Setting An Action To Handle Starting A New Command If There Is Another Command Running
doc/cargo_command_execution.md
Outdated
@@ -75,6 +75,17 @@ The possible values: | |||
* Some object (`{ "RUST_BACKTRACE": 1 }`) | |||
* `null` | |||
|
|||
### Setting An Action To Handle Starting A New Command If There Is Another Running Command | |||
|
|||
The `"rust.actionOnStartingCommandIfThereIsRunningCommand"` configuration parameter specifies what the extension should do in case of starting a new command if there is another running command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
"rust.actionOnStartingCommandIfThereIsRunningCommand" configuration parameter specifies what the extension should do in case of starting a new command when there is another command running.
doc/cargo_command_execution.md
Outdated
|
||
* `"Stop running command"` - the extension will stop another running command and start a new one | ||
* `"Ignore new command"` - the extension will ignore a request to start a new command | ||
* `"Show dialog to let me decide"` - the extension will show an information box to let a user decide whether another running command should be stopped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*
"Show dialog to let me decide" - the extension will show an information box to let the user decide whether or not to stop a running command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the
user?
Which rule regulates ...whether or not to stop...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a user" isn't technically wrong, it just happens to sound more natural to say "the user", likely because we are talking about a hypothetical scenario: the extension will do X and the user will choose to react. It's just more specific. With regard to your second question, I don't know if there is a specific rule, I can only confirm it sounds more natural. Your English is understandable, I would not worry so much.
It is preliminary pull request. It is not finished.
I am going to add handling the configuration parameter.
If it is set to
"stop"
, the extension will stop the running command and start a new one.If it is set to
"dialog"
, the extension will show a message dialog with the "There is a running cargo command" text and the two buttons "Terminate" and "Cancel".If a user chooses
"Terminate"
, the extension will stop the running command and start the new one.Otherwise, the extension will ignore a request to start a new command.
If it is set to
null
, the extension will ignore a request to start a new command.Another name for the configuration parameter is welcome.
Fixes #75