libedit
- Replaces
readline macosuseslibeditas its default line editing and history library
Prepare
Section titled “Prepare”- Depends on the
filecommand? libeditonly checks if__STDC_ISO_10646__is defined (and not its value) andmusldefines it instdc-predef.hwhichgccincludes by default unlikeclangmuslalso providessys/ttydefaults.h
Package
Section titled “Package”inputrcis not needed- Prefer symlinks to
editline/readline.hinstead of touching emptyhistory.h,readline.handtilde.hheaders or having#include <editline/readline.h>inside - Prefer symlinks to
libedit.soinstead of linker scriptsINPUT(-ledit)
editrc
Section titled “editrc”bind -eandbind -vreset the bindings so run them as early as possiblebind -k up ...is identical tobind "\e[A" ...bind -k down ...is identical tobind "\e[B" ...- Prefer
ed-search-prev-historytoed-prev-historyanded-search-next-historytoed-next-historyfor friendlier incremental prefix search - We might need to append
history size 1024andhistory unique 1lines toeditrcunless they’re the default behavior
Keys and Macros
Section titled “Keys and Macros”"\e[1;5C" :: ctrl + right"\e[1;5D" :: ctrl + left"\e[1~" :: home"\e[3;5~" :: ctrl + delete"\e[3~" :: delete"\e[4~" :: end"\e[5C" :: ctrl + right"\e[5D" :: ctrl + left"\e[5~" :: page up"\e[6~" :: page down"\e[7~" :: home (rxvt)"\e[8~" :: end (rxvt)"\eOc" :: ctrl + right (rxvt)"\eOd" :: ctrl + left (rxvt)"^R" :: ctrl + r"^W" :: ctrl + wReferences
Section titled “References”- https://github.com/chimera-linux/cports/blob/master/main/libedit
- https://github.com/chimera-linux/libedit-chimera
- https://github.com/ralish/dotfiles/blob/main/editline/.editrc
- https://github.com/sabotage-linux/sabotage/blob/master/pkg/libedit
- https://github.com/wikimedia/mediawiki-vagrant/blob/master/puppet/modules/misc/files/editrc
- https://man.netbsd.org/editline.7
- https://man.netbsd.org/editrc.5
- https://unix.stackexchange.com/questions/548708/editrc-changing-keybindings-in-etc-editrc