]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxcmd: use emacs mode for command history editing
authorDarrick J. Wong <djwong@kernel.org>
Fri, 25 Feb 2022 22:32:48 +0000 (17:32 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 25 Feb 2022 22:32:48 +0000 (17:32 -0500)
commit3aef6357ea94a1b699ea48fbc2d54879ca820307
tree345bba3dc10a6d32c71a2806ccadb03f4fedd213
parent9a31fd837d23fd8691ad0bec7f17d625dc16c9de
libxcmd: use emacs mode for command history editing

Prior to xfsprogs 5.7.0, we built xfsprogs with libreadline support by
default.  In its default configuration, that library interpreted various
keystrokes in a direct manner (e.g. backspace deletes the character to
the left of the cursor), which seems consistent with how emacs behaves.

However, libeditline's default keybindings are consistent with vim,
which means that suddenly users are presented with not the same line
editing interface that they had before.  Since libeditline is
configurable (put "bind -v" in editrc if you really want vim mode),
let's put things back the way they were.  At least as much as we can.

Fixes: bbe12eb9 ("xfsprogs: remove libreadline support")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/input.c
libxcmd/input.c