Skip to content

What powershell prints on end of command to show a PROMPT. #16118

@zhiburt

Description

@zhiburt

Prerequisites

Steps to reproduce

Hey there,

I am trying to mimic user input in expect style for powershell. Via sending commands to pwsh's stdin.
And I don't understand how I actually can be sure that command is done.

But now exactly I am trying to understand what I need to send powershel to be able to run a next command.

I see that pwsh expects that some byte sequences will be given to it as an indication that command is done.
And they different from time to time.

\u{1b}[11;68R
\u{1b}[11;59R
\u{1b}[11;19R

As I guess a line-disciple does this or this is done via your means?

To see what I mean you can use

zhiburt/expectrl#14

and run

cargo run --example interact

Expected behavior

A prompt printed after typing command + `\r`

Actual behavior

A prompt isn't printed on sending `\r` as `ENTER`

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.4
PSEdition                      Core
GitCommitId                    7.1.4
OS                             Linux 5.12.14-300.fc34.x86_64 #1 SMP Wed Jun 30 18:30:21 UTC 2021
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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-No ActivityIssue has had no activity for 6 months or moreWG-Interactive-PSReadLinePSReadline related issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions