Bug 12516 - If compiled in, it is impossible to disable cursor position query escape sequence in ash lineedit
Summary: If compiled in, it is impossible to disable cursor position query escape sequ...
Status: RESOLVED INVALID
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-29 07:51 UTC by Antti Louko
Modified: 2021-06-06 02:58 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Louko 2020-01-29 07:51:46 UTC
If line editing feature is compiled in busybox, it is imbossible to disable ash to send ESC [ 6n after each prompt in interactive mode.

This is wrong in many ways:

- There are terminals which don't accept ANSI escape sequences.
- It makes is difficult to do sane script talking to ash in a remote device.
- It is not documented properly.
- This is probably against POSIX shell specs.

Ideal solution would be to:

- Make it possible to disable it with a run-time option.
- Automatically detect that the terminal doesn't reply and then disable it automatically.
Comment 1 Denys Vlasenko 2021-06-06 02:58:34 UTC
Disable this config option during build:


config FEATURE_EDITING_ASK_TERMINAL
        bool "Query cursor position from terminal"
        default n
        depends on FEATURE_EDITING
        help
        Allow usage of "ESC [ 6 n" sequence. Terminal answers back with
        current cursor position. This information is used to make line
        editing more robust in some cases.
        If you are not sure whether your terminals respond to this code
        correctly, or want to save on code size (about 400 bytes),
        then do not turn this option on.