-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
print a new line on exit #16439
base: master
Are you sure you want to change the base?
print a new line on exit #16439
Conversation
2724b2f
to
418a57f
Compare
@teknoraver An issue should be created before submitting a PR for evaluating whether a fix is really needed. Can you please first open an issue for discussion? Here is the process defined in our document:
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Hi @iSazonov, why this is marked as draft? |
We need a conclusion in related issue before review the PR. |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
@daxian-dbw @anmenaga hi, can I get a review for this trivial PR? |
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.
I'm concerned that this could be a break and change because you are now adding an extra line.
@@ -2675,6 +2675,9 @@ internal void Run(bool inputLoopIsNested) | |||
_parent._isRunningPromptLoop = false; | |||
} | |||
} | |||
#if UNIX |
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.
I'm not sure this is right, it appears from this PR an extra new line would be produced when exit
is used.
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.
to overcome this, we should rework the code so to don't even print the prompt when EOF happens
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.
I noticed that there is already code that does something similar for Ctrl+C at https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs#L2555-L2561. I wonder if this case should be handled there as well.
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Having played with different |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
When quitting the shell with ^D, a new line is not print in Unix: mcroce@t490s:~$ pwsh PowerShell 7.2.0 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help. PS /home/mcroce> mcroce@t490s:~$ Do it to keep the behaviour consistent with other Unix shell and the Windows version, which doesn't have this issue: Microsoft Windows [Version 10.0.19043.1348] (c) Microsoft Corporation. All rights reserved. C:\Users\mcroce>pwsh < NUL PowerShell 7.2.0 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help. PS C:\Users\mcroce> C:\Users\mcroce>
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
When quitting the shell with ^D, a new line is not print in Unix:
Do it to keep the behaviour consistent with other Unix shell.
Fixes #16466
PR Summary
PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).