psysh (readline?) broken with tee #13197

Open
opened 2026-01-31 03:36:26 +00:00 by claunia · 0 comments
Owner

Originally created by @chx on GitHub (Mar 26, 2021).

Windows Terminal version (or Windows build number)

1.6.10571.0

Other Software

psysh , Ubuntu tee

Steps to reproduce

  1. sudo apt install php-cli
  2. wget https://psysh.org/psysh ; chmod +x psysh
  3. ./psysh works normally
  4. ./psysh |tee foo

Observe no prompt and up arrow prints control characters. This was working with WSL1 a few days ago.

Expected Behavior

Well I wasn't expecting tee to completely break the terminal... I wouldn't be surprised if https://github.com/microsoft/terminal/issues/6096 https://github.com/microsoft/terminal/issues/4243 were the same.

Note it's possible to reproduce this without tee although it is way more complicated, you need Drupal and drush and drush-launcher but when running drush php (which executes an integrated psysh) via the launcher it is similarly broken vs vendor/bin/drush php is not broken.

I ran python |tee foo and got the same control characters although there at least the prompt didn't disappear.

Actual Behavior

Broken readline behavior.

Originally created by @chx on GitHub (Mar 26, 2021). ### Windows Terminal version (or Windows build number) 1.6.10571.0 ### Other Software psysh , Ubuntu tee ### Steps to reproduce 1. sudo apt install php-cli 1. wget https://psysh.org/psysh ; chmod +x psysh 1. ./psysh works normally 1. ./psysh |tee foo Observe no prompt and up arrow prints control characters. This was working with WSL1 a few days ago. ### Expected Behavior Well I wasn't expecting tee to completely break the terminal... I wouldn't be surprised if https://github.com/microsoft/terminal/issues/6096 https://github.com/microsoft/terminal/issues/4243 were the same. Note it's possible to reproduce this without tee although it is way more complicated, you need Drupal and drush and drush-launcher but when running `drush php` (which executes an integrated psysh) via the launcher it is similarly broken vs `vendor/bin/drush php` is not broken. I ran `python |tee foo` and got the same control characters although there at least the prompt didn't disappear. ### Actual Behavior Broken readline behavior.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 03:36:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13197