Get-PSRead...).HistorySavePath glitches the console when set to $null

Aperta
#4,039 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp, powershell
Ambito
cli

Direzione di ricerca

Start by reproducing the issue with (Get-PSReadLineOption).HistorySavePath = $null, then press Up or enter a command in the Windows PowerShell console. Trace the HistorySavePath handling and console rendering behavior; done means disabling history does not display stray keystrokes or require a second Enter, while normal sessions remain unaffected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Needs-Triage :mag:
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
the bug happens both in the pre-installed powershell and 7.4.2 powershell, im using windows 11, the bug happend when i used "(Get-PSReadLineOption).HistorySavePath = $null" and then either pressed up arrow or typed in a command, some text "last 90 keystrokes" appeared: ![image](https://github.com/PowerShell/PSReadLine/assets/69431561/bb412007-bf3e-46fa-b6d9-801b97483027)
Screenshot

image

Environment data
PS Version: 7.4.2
PS HostName: ConsoleHost
PSReadLine Version: 2.3.5
PSReadLine EditMode: Windows
OS: 10.0.22621.2860 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 9001
Steps to reproduce
  1. open powershell
  2. write this:
 (Get-PSReadLineOption).HistorySavePath = $null
  1. either write a command and press enter, or press up arrow
Expected behavior

all keystrokes you press appear on the "last X keystrokes:" part, and a big text that re-appears for each command that is run, and sometimes you need to press enter twice for the command to get run

Actual behavior

it happend each time i tried it, powershell goes back to normal if you restart the session, but if you start a separate session while the glitched one is running the separate session is normal, and the glitched one stays glitched, and the double enter keypress behavior is needed for commands to run

Lingua principale
C#
Stelle
4.4k
Fork
341
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/PSReadLine

Tutte le issue di PowerShell/PSReadLine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.