Skip to content

bash -> powershell -> bash doesn't show symbols when typing #484

Closed

Description

@vors

Repro:

  • Run bin/powershell
  • run bash
  • type ls

Expected:
Shows "ls"

Actual:
Doesn't displayed typed symbols

  • Hit enter

Expected (Actual):
ls executed

Note that bash -> powershell -> bash -> vim works fine: I can type in vim and symbols appears on the screen

Tested on 6d51940 Ubuntu 14.04

Activity

  1. andyleejordan commented on Feb 4, 2016

    @andyleejordan
    Member

    I think what's happening is that System.Console (used in PowerShell's readline functionality) turns off the echo TTY mode, and bash doesn't explicitly turn it on (and Vim likely does).

    To fix this, I think we'd have to eliminate all uses of Console.ReadKey() from our readline implementation.

  2. andyleejordan commented on Feb 4, 2016

    @andyleejordan
    Member

    Yeah that's definitely what's going on. If, after you've opened Bash, you execute stty echo, your characters will then be displayed as expected.

  3. vors commented on Feb 4, 2016

    @vors
    CollaboratorAuthor

    cool, thanks for the workaround :)

  4. andyleejordan commented on Feb 4, 2016

    @andyleejordan
    Member

    Reported to .NET: dotnet/corefx#5902.

  5. andyleejordan commented on Feb 8, 2016

    @andyleejordan
    Member

    George Fleming (@palladia) The CoreFX team would like to help us fix this bug, but would like a repro outside of PowerShell, which means writing a small console app and debugging the problem at least to the point of repro'ing in a new program.

    It should involve just using Console.ReadKey() and starting a process, though you may have to see if PowerShell does something non-default when launching a native process.

  6. palladia commented on Feb 10, 2016

    @palladia
    Contributor

    Andy Jordan (@andschwa) I may have something...Take a look at \scratch2\geflem\echo_test\Program.cs, and read the comments. I still haven't quite figure out why bash is not displaying the prompt, but try this: If "string cmdToExecute = ReadALine()" is uncommented, compile, run, and type "/bin/bash" in first line, and "dir" in second line. Note that "dir" is not echoed. Type "exit" to exit. Now, comment out that line, and uncomment "string cmdToExecute = "/bin/bash". Build, run, and type "dir", and note that it's echoed correctly.

    Let me know if you can/can't repro this.

  7. andyleejordan commented on Feb 10, 2016

    @andyleejordan
    Member

    It's not displaying it because the echo TTY mode gets disabled by Console.ReadKey().

    Sounds like you're on the right track to repro though, will take a look soon. Is that in a branch or a repo somewhere?

  8. andyleejordan commented on Feb 11, 2016

    @andyleejordan
    Member

    Awesome, Gist shared to .NET team.

  9. added
    Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usability
    on Feb 20, 2016
  10. andyleejordan commented on Feb 27, 2016

    @andyleejordan
    Member

    Fix in CoreFX is incoming courtesy of Stephen, will test and update when available.

  11. andyleejordan commented on Mar 1, 2016

    @andyleejordan
    Member

    Fixed in dotnet/corefx#6488; waiting on packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-BugIssue has been identified as a bug in the productUsability(LEGACY) Helps filter issues that might be higher priority because they directly affect usability

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions