Skip to content

bind prints raw control characters when no slash-escape exists for it #7631

@lilyball

Description

@lilyball

The default set of binds includes a binding on the del control character.

bind --preset $argv \x7f backward-delete-char

But when you ask bind to then print its bindings, it just prints the del control character raw:

bind --preset -k backspace backward-delete-char
bind --preset  backward-delete-char
bind --preset -k sdc backward-delete-char

(piping that into less will show the control character as a highlighted ^?)

bind should instead show any non-printable character as a hex or unicode escape, if there's no key name for it. Though in this particular case maybe it should just show it as \c?, which is a bit confusing and generally can't be typed but is technically accurate.

fish, version 3.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions