diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a6cc07393..5fc3315f0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -83,6 +83,7 @@ Interactive improvements - The ``vared`` command can now successfully edit variables named "tmp" or "prompt" (:issue:`8836`). - ``time`` now emits an error if used after the first command in a pipeline (:issue:`8841`). - ``fish_add_path`` now prints a message for skipped non-existent paths when using the ``-v`` flag. +- Since fish 3.2.0, pressing :kbd:`Control-D` while a command is running would end up inserting a space into the next commandline, which has been fixed (:issue:`8871`). New or improved bindings ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index bec3da179..e3bcbe174 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -186,7 +186,7 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod # Closing a command substitution expands abbreviations bind --preset $argv ")" self-insert expand-abbr # Ctrl-space inserts space without expanding abbrs - bind --preset $argv -k nul 'commandline -i " "' + bind --preset $argv -k nul 'test -n "$(commandline)" && commandline -i " "' # Shift-space (CSI u escape sequence) behaves like space because it's easy to mistype. bind --preset $argv \e\[32\;2u 'commandline -i " "; commandline -f expand-abbr'.