overwrite mode on FreeBSD when crossing space in command line #9232

Closed
opened 2026-01-31 01:49:16 +00:00 by claunia · 6 comments
Owner

Originally created by @zsbolyoczki on GitHub (Jun 24, 2020).

Environment

Windows Version: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Windows Terminal version: 1.0.1401.0

Issue description

On FreeBSD based servers (and appliances too) the prompt switches to 'overwrite mode' when navigating through a space from the end of the line to the beginning of the line.

Steps to reproduce

  1. Log in to a FreeBSD server (or FBSD based appliance) with ssh. (It doesn't matter which shell (bash, csh, etc.) is being used.)
  2. Try to type a command that's made of more words (or only one word but with a space after it)
  3. Start to navigate from the end of the line to the beginning of the line (either with 'left arrow' or 'Home' or any other way)
  4. Until the 1st space from the right is passed in the command, the command line is in 'insert mode'
  5. Just when the 1st space is passed from the right, the command line switches to 'overwrite mode'

Example #1:
$ commandX

When one is navigating on this one word, it's OK, command line is in 'insert mode'
Once one is typing a space at the end of the line and starts to navigate back to any other letter, the command line changes to 'overwrite mode'

Example #2:
$ commandX paramY paramZ

When navigating backwards from right to left, command line is in 'insert mode' until letter 'Y' is reached. Once the space is crossed next to letter 'Y' the command line switches to 'overwrite mode'.

Expected behavior

Crossing any space in the command line shouldn't switch the command line to 'overwrite mode'.

Working examples which doesn't have this 'switching' behaviour:

  • putty
  • any native linux terminals.
Originally created by @zsbolyoczki on GitHub (Jun 24, 2020). ### Environment Windows Version: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal version: 1.0.1401.0 ### Issue description On FreeBSD based servers (and appliances too) the prompt switches to 'overwrite mode' when navigating through a space from the end of the line to the beginning of the line. ### Steps to reproduce 1. Log in to a FreeBSD server (or FBSD based appliance) with ssh. (It doesn't matter which shell (bash, csh, etc.) is being used.) 2. Try to type a command that's made of more words (or only one word but with a space after it) 3. Start to navigate from the end of the line to the beginning of the line (either with 'left arrow' or 'Home' or any other way) 4. Until the 1st space from the right is passed in the command, the command line is in 'insert mode' 5. Just when the 1st space is passed from the right, the command line switches to 'overwrite mode' Example #1: $ commandX When one is navigating on this one word, it's OK, command line is in 'insert mode' Once one is typing a space at the end of the line and starts to navigate back to any other letter, the command line changes to 'overwrite mode' Example #2: $ commandX paramY paramZ When navigating backwards from right to left, command line is in 'insert mode' until letter 'Y' is reached. Once the space is crossed next to letter 'Y' the command line switches to 'overwrite mode'. ### Expected behavior Crossing any space in the command line shouldn't switch the command line to 'overwrite mode'. Working examples which doesn't have this 'switching' behaviour: - putty - any native linux terminals.
claunia added the Area-OutputIssue-BugResolution-Duplicate labels 2026-01-31 01:49:16 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 24, 2020):

Couple of questions:

  • Which version of ssh are you using? The inbox ssh.exe, or the ssh from a linux distro installed with WSL?
  • does this repro with a legacy console window (conhost.exe)?
@zadjii-msft commented on GitHub (Jun 24, 2020): Couple of questions: * Which version of `ssh` are you using? The inbox `ssh.exe`, or the `ssh` from a linux distro installed with WSL? * does this repro with a legacy console window (conhost.exe)?
Author
Owner

@zsbolyoczki commented on GitHub (Jun 24, 2020):

  • I'm using ssh from WSL (Ubuntu-18.04 (Default))
  • I couldn't find proper way to get current WSL version but "uname -a" returns "4.4.0-18362-Microsoft" if that helps.
  • The issue is there with ssh.exe from cmd and with ssh client from WSL.
@zsbolyoczki commented on GitHub (Jun 24, 2020): - I'm using ssh from WSL (Ubuntu-18.04 (Default)) - I couldn't find proper way to get current WSL version but "uname -a" returns "4.4.0-18362-Microsoft" if that helps. - The issue is there with ssh.exe from cmd and with ssh client from WSL.
Author
Owner

@DHowett commented on GitHub (Jun 24, 2020):

I believe this is because we don't support #1947...

@DHowett commented on GitHub (Jun 24, 2020): I believe this is because we don't support #1947...
Author
Owner

@zsbolyoczki commented on GitHub (Jun 24, 2020):

seems to be the same issue to this #125 and xterm-256color is affected.

@zsbolyoczki commented on GitHub (Jun 24, 2020): seems to be the same issue to this #125 and xterm-256color is affected.
Author
Owner

@DHowett commented on GitHub (Jun 24, 2020):

Thanks for following up. I'm gonna make /dup #1947 the master issue for IRM.

@DHowett commented on GitHub (Jun 24, 2020): Thanks for following up. I'm gonna make /dup #1947 the master issue for IRM.
Author
Owner

@ghost commented on GitHub (Jun 24, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jun 24, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9232