Ctrl-A followed by Ctrl-E moves to wrong position when command prompt is on same line as JSON output from curl #17500

Open
opened 2026-01-31 05:44:25 +00:00 by claunia · 0 comments
Owner

Originally created by @hkskoglund on GitHub (May 18, 2022).

Windows Terminal version

1.12.10983.0

Windows build number

10.0.22000.0

Other Software

curl 7.81.0 (WSL 2)

Steps to reproduce

  1. curl 'https://frost.met.no/observations/v0.jsonld?sources=SN90450&referenceTime=2022-05-11T00:00:00Z/2022-05-17T23:59:59Z&elements=sum(precipitation_amount%20P1D)&timeResolution=days'
  2. Notice } before prompt "}henning@ideapadpro:~$"
  3. Press up arrow (cursor right of ' )
  4. Press Ctrl-A, Press Ctrl-E (cursor before ')
  5. Press Ctrl-Left until start of line
  6. Notice } removed at front of line

Expected Behavior

Ctrl-E moves to same position (end of line) after Ctrl-A.

Actual Behavior

Ctrl-E moves one character less than expected after Ctrl-A. "}" removed at start of line when multiple Ctrl-Left until start of line is pressed.

This makes it hard to edit the command, characters are inserted in the wrong position.

Workaround: press return and let the command prompt start on a new line

Originally created by @hkskoglund on GitHub (May 18, 2022). ### Windows Terminal version 1.12.10983.0 ### Windows build number 10.0.22000.0 ### Other Software curl 7.81.0 (WSL 2) ### Steps to reproduce 1. curl 'https://frost.met.no/observations/v0.jsonld?sources=SN90450&referenceTime=2022-05-11T00:00:00Z/2022-05-17T23:59:59Z&elements=sum(precipitation_amount%20P1D)&timeResolution=days' 2. Notice } before prompt "}henning@ideapadpro:~$" 3. Press up arrow (cursor right of ' ) 4. Press Ctrl-A, Press Ctrl-E (cursor before ') 5. Press Ctrl-Left until start of line 6. Notice } removed at front of line ### Expected Behavior Ctrl-E moves to same position (end of line) after Ctrl-A. ### Actual Behavior Ctrl-E moves one character less than expected after Ctrl-A. "}" removed at start of line when multiple Ctrl-Left until start of line is pressed. This makes it hard to edit the command, characters are inserted in the wrong position. Workaround: press return and let the command prompt start on a new line
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 05:44:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17500