Skip to content

Bind Shift+Space to Space by default #8874

@gpanders

Description

@gpanders

Fish version: 3.4.1
OS: macOS 12.3
Terminal: iTerm2

When using a terminal that supports the CSI u modifiers, Shift+Space is sent as \x1b[32;2u. This is the case for e.g. iTerm2. Unfortunately, Shift+Space is an extremely easy combination to mistype when one simply meant to insert a space. Consider the case when you're setting an environment variable:

set -U SOME_VAR foo

After typing Shift+r to enter R if I press Space while my finger is still holding shift, the sequence \x1b[32;2u is sent instead of a space. This happens quite often (for me, at least).

It is possible to tell fish to simply insert a space when this sequence is received:

bind \e\[32\;2u 'commandline -i " "'

I propose making the above binding a default as a convenience. I don't have any data for this assertion, but I would hazard a guess that most people would want Shift+Space to simply insert a space. Those who want to use that extra combination for something else can always map it themselves, though I'd bet that is a minority use case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions