PSReadLine breaks buffered commands when running Git commands
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by reproducing the buffered commands in pwsh -NoProfile with an SSH-based Git repository, then compare behavior with PSReadLine removed. Investigate how PSReadLine handles input while git pull is running; done means subsequent Enter keystrokes remain intact and the commands execute sequentially.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
N/A
Screenshot
N/A
Environment data
PS Version: 7.6.3
PS HostName: ConsoleHost
PSReadLine Version: 2.4.5
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 280
BufferHeight: 70
Steps to reproduce
I run the following commands in quick succession, not waiting for them to finish, but relying on the input buffer of the terminal to execute them sequentially. The current working directory is a Git repository. I tend to execute these commands from the integrated terminal in Visual Studio Code, but I can also reproduce it reliably in Windows Terminal.
- git pull ; pulls from an SSH origin, this operation takes 2 to 3 seconds.
- pnpm i ; this command is an alias for pnpm install, which installs packages using the pnpm package manager.
- pnpm dev ; this command runs the
devcommand that our project defines as starting the development server.
None of these commands require my input. Typically, I can finish typing these short commands before the pull operation completes. The full keystrokes thus look like
git pull<Enter>pnpm i<Enter>pnpm dev
It is important to mention that the Git repository has an SSH origin. I have been unable to reproduce this with a Git repository that uses an HTTPS origin. The SSH executable is the OpenSSH bundle that's included with Windows.
The reason I'm reporting this here is because I've tried the following things, and am genuinely unsure of where to post it now.
- Running in
cmd.exedoes not reproduce the issue. The commands are executed as expected. - If I run Start-Sleep 5, and then type my 3 commands while it sleeps, it works as expected, and my commands are buffered correctly. If the sleep completes, and I run my commands, the unexpected behavior happens again.
- If I run Remove-Module PSReadLine first, and then run my 3 commands, they always execute as expected.
- If I run my commands in
pswh -NoProfile, it also breaks, so it's probably not my PowerShell profile.
The disabling of PSReadLine working leads me to believe that something odd may be happening here. If this issue turns out to be filed in the wrong place, I'd be happy to hear it. If more information and/or tests are needed, I'm happy to provide.
Expected behavior
I expect PowerShell to run each of the commands sequentially. This worked up to an indeterminate amount of time ago (let's say last year), until it broke, and it only became annoying enough for me to report this now.
Actual behavior
The Enter keystrokes in the subsequent commands are turned into m characters. The terminal output (in pwsh -NoProfile) looks as follows:
PS redacted_path> git pull
Already up to date.
PS redacted_path> pnpm impnpm dev
'impnpm' is not recognized as an internal or external command,
operable program or batch file.
[ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL] Command "impnpm" not found
- Ngôn ngữ chính
- C#
- Star
- 4.4k
- Fork
- 341
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PowerShell/PSReadLine
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PowerShell/PSReadLine#3470 · 3 reaction ·
Tất cả issue của PowerShell/PSReadLine
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
azurenoops/spin_agent#975 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·