mksh shell, how to configure "up/down-key" on keyboard to scroll up/down in history ?

Code:
     bind string=[editing-command] [...]
     bind -m string=substitute [...]
	    To string, which should consist of a control character optionally
	    preceded by	one of the three prefix	characters and optionally suc-
	    ceeded by a	tilde character, the editing-command is	bound so that
	    future input of the	string will immediately	invoke that editing
	    command.  If a tilde postfix is given, a tilde trailing the	con-
	    trol character is ignored.	If -m (macro) is given,	future input
	    of the string will be replaced by the given	NUL-terminated
	    substitute string, wherein prefix/control/tilde characters mapped
	    to editing commands	(but not those mapped to other macros) will be
	    processed.

	    Prefix and control characters may be written using caret notation,
	    i.e. ^Z represents Ctrl-Z.	Use a backslash	to escape the caret,
	    an equals sign or another backslash.  Note that, although only
	    three prefix characters (usually Esc, ^X and NUL) are supported,
	    some multi-character sequences can be supported.
 
Unrelated note
mksh has few dependencies,

ldd /bin/sh
/bin/sh:
libedit.so.8 => /lib/libedit.so.8 (0x2faa06c9f000)
libc.so.7 => /lib/libc.so.7 (0x2faa08a07000)
libncursesw.so.9 => /lib/libncursesw.so.9 (0x2faa07afc000)

ldd /usr/local/bin/mksh
/usr/local/bin/mksh:
libc.so.7 => /lib/libc.so.7 (0x822f7e000)
 
ldd /usr/local/bin/fish
libncursesw.so.9 => /lib/libncursesw.so.9 (0x821d3b000)
libpcre2-32.so.0 => /usr/local/lib/libpcre2-32.so.0 (0x822a20000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x823427000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x823ec5000)
libm.so.5 => /lib/libm.so.5 (0x8248ab000)
libthr.so.3 => /lib/libthr.so.3 (0x825b6d000)
libc.so.7 => /lib/libc.so.7 (0x826877000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x82527f000)
 
Back
Top