Skip to content

Interactive read -p prompt renders raw-byte marker pairs instead of the control bytes #2883

Closed

Description

@caomengxuan666

Summary

Interactive read -p renders its prompt argument's raw-byte marker pairs literally: a prompt containing ESC displays EE 80 80 EE 80 9C (the U+E000 pair glyphs) instead of the ESC byte. GNU emits the byte.

Found by the #2879 systematic carrier-protocol sweep (PTY cell s4, job-control-parent harness, byte-verified vs GNU bash 5.3.20).

Scope

PR #2878 fixed the post-expansion decode for PS0/PS1/PS2/PS4 at three sites; the read -p prompt travels a different display path (read builtin → line editor) and still passes transport text undecoded. Not covered by #2878.

Fix destination (1.5.1, simple fix — sweep item E5)

Decode the read -p prompt before handing it to the line editor, mirroring #2878's decode_prompt_transport at the read-builtin site (strip-then-decode ordering so decoded 0x01/0x02 data survives).

Regression seed: sweep PTY cell s4 (~/workspace/pua-audit/probes/pty_prompts.py) — pin as a chained PTY case per the niu #827 gate discipline.

Activity

  1. added this to the 1.5.1 milestone on Nov 6, 2026
  2. added
    bug
    gnu-baseline
    area:interactive
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:interactivebuggnu-baseline

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions