question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arrow keys don't work in the powershell console when invoked from a TTY

See original GitHub issue

Prerequisites

Steps to reproduce

  • Install fedora 36
  • run the following commands in a TTY:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
sudo dnf makecache
sudo dnf install powershell
pwsh
Get-ChildItem -Path "/"
  • Press Up arrow on keyboard

Expected behavior

PS /home/user> Get-ChildItem -Path "/"

Actual behavior

PS /home/user> OA

Error details

No error produced

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Linux 5.19.6-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 31 17:58:15 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Additional Info

This post is related to Issue 16606 $TERM for me is Linux as it’s a TTY i’m invoking it from.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
daxian-dbwcommented, Sep 8, 2022

The Console.Key re-write work (https://github.com/dotnet/runtime/pull/72193) was checked in .NET on 8/1 and will be included in the RC1 release. This issue is likely to be addressed by that change. Please verify if that’s the case after we release the PowerShell RC1 this month.

0reactions
msftbot[bot]commented, Oct 5, 2022

This issue has been marked as “Waiting on Author” and has not had any activity for 7 day. It has been closed for housekeeping purposes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arrow keys don't work when running cmd or powershell in ...
Arrow keys don't work when running cmd or powershell in Linux terminal emulators. This may seem a bit odd, but I'm trying to...
Read more >
Tab completion and arrow keys don't work in GHCI in Git ...
The arrow keys don't invoke command history. If I press △ , the cursor moves up, but I'd have expected it to cycle...
Read more >
Backspace, Tab, Del and arrow keys not working in ...
When I ssh into another Ubuntu machine with my account (with sudo permissions), my backspace key generates some awkward symbols on pressing.
Read more >
The Case of the Disappearing PowerShell Console
Summary: Ed Wilson, Microsoft Scripting Guy, talks about fixing a problem where his Windows PowerShell console disappears.
Read more >
Is there any reason why I get ^[[A when I press up arrow at ...
In an ANSI-compliant terminal, the arrow keys don't send a single character (there are no codes for arrows in the ASCII character set),...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found