Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2024 22:06:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 276250] Backspace issue related to PS1 special variable containing \n formatting sequence
Message-ID:  <bug-276250-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276250

            Bug ID: 276250
           Summary: Backspace issue related to PS1 special variable
                    containing \n formatting sequence
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: white-pack@pm.me

The non-printing character \n in a formatting sequence for PS1 only works as
expected at the beginning of a formatting sequence. If placed anywhere else,
then the backspace key behaves erratically.

For instance:

1) The following sequence works as expected with no backspace issues:
export PS1=3D"\[\n\]\h:\w \$ "

2) The following one reveals an issue with the backspace behavior:
export PS1=3D"\[\n\]\h:\w \[\n\]\$ "

This has been observed at the console level.
No X-Windows is running, thus no graphical terminals are involved.

$ echo $TERM=E2=80=8B
xterm-256color=E2=80=8B
=E2=80=8B
$ stty=E2=80=8B
speed 9600 baud;=E2=80=8B
lflags: echoe echoke echoctl=E2=80=8B
iflags: -iutf8
oflags: tab0=E2=80=8B
cflags: cs8 -parenb=E2=80=8B

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276250-227>