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

Always prompt when exiting #7129

Closed
wants to merge 3 commits into from

Conversation

Chips1234
Copy link
Contributor

Summary of the Pull Request

Add a setting with default as false. If it is true, then there will be a warning when exiting
New warning alwayswarn

References

Closes #2976 and addresses #6549 (comment).

PR Checklist

Detailed Description of the Pull Request / Additional comments

Change the name of CloseWarningDialog to CloseAllWarningDialog to avoid confusion and the new dialog (always warn) will be referred to as CloseWarningDialog.

Validation Steps Performed

Manual tests

Change the name of `CloseWarningDialog` to `CloseAllWarningDialog` and the new dialog (alwayswarn) will be refered as `CloseWarningDialog`.
@ghost ghost added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. labels Jul 30, 2020
@Chips1234
Copy link
Contributor Author

If this merges, I will add a commit to #7077 for always warn on tab close

@github-actions
Copy link

New misspellings found, please review:

  • thier
To accept these changes, run the following commands
perl -e '
my @expect_files=qw('".github/actions/spell-check/expect/alphabet.txt
.github/actions/spell-check/expect/expect.txt
.github/actions/spell-check/expect/web.txt"');
@ARGV=@expect_files;
my @stale=qw('"atg BKMK colo consoleaccessibility Dst emptybox FFF Filledbox fullcolor hyperlink IDefault minmax NRCS phsl popclip remoting rerendered ROWSTOSCROLL SCS shobjidl stdarg stddef stdlib terminalnuget Tofill unfocuses xab xb xbc xca xce xdd xffff "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^($re)(?:$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spell-check/expect/4f1ec895fd591dc91250aa18b888c18738a4e1bc.txt";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"dst EMPTYBOX nrcs Remoting Scs Shobjidl thier "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
git add .github/actions/spell-check/expect || echo '... you want to ensure .github/actions/spell-check/expect/4f1ec895fd591dc91250aa18b888c18738a4e1bc.txt is added to your repository...'
✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

⚠️ The command is written for posix shells. You can copy the contents of each perl command excluding the outer ' marks and dropping any '"/"' quotation mark pairs into a file and then run perl file.pl from the root of the repository to run the code. Alternatively, you can manually insert the items...

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spell-check/dictionary/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spell-check/dictionary/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spell-check/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spell-check/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

⚠️ Reviewers

At present, the action that triggered this message will not show its ❌ in this PR unless the branch is within this repository.
Thus, you should make sure that this comment has been addressed before encouraging the merge bot to merge this PR.

@AnuthaDev
Copy link
Contributor

I think "exit" should be used instead of "quit"

@Chips1234
Copy link
Contributor Author

I think "exit" should be used instead of "quit"

@AnuthaDev or even "Close"? Since the multiple tab warning uses close

@AnuthaDev
Copy link
Contributor

I think "exit" should be used instead of "quit"

@AnuthaDev or even "Close"? Since the multiple tab warning uses close

Sure :)

@microsoft-github-updates microsoft-github-updates bot changed the base branch from master to main October 22, 2020 00:27
@swinder0161
Copy link

Please merge this asap, it is very annoying when clicking close accidentally on a running program or session

@Cuberick-Orion
Copy link

This can be of great help. Looking forward to its being released.

@htcfreek
Copy link

Will this be ready in the next release?

@zadjii-msft
Copy link
Member

Nope. We'll make sure to update this thread when there is.

The real issue here is that we need to figure this setting out. There's a long thread over in #6549 with a breakdown of how the options should work. It needs to be socialized with the rest of the team, preferably in a formal spec, to make sure we've got the options covered. I'd recommend subscribing to that thread.

@DHowett
Copy link
Member

DHowett commented Jul 20, 2023

Thank you so much for working on this draft work! We've chosen to take the project in a slightly different direction, and make sure that this feature is fully specified before we commit to it since it's deeply related to the other pane/tab/window closing work in your other PR.

@DHowett DHowett closed this Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Customize confirmation prompt before exit.
7 participants