various openbsd's ksh hacks

Clear screen (^L) in vi mode

2009-09-01: In zsh and bash, you can hit ^L at any point to clear your screen. It might be a bad habit but if you can't get used to type 'clear' manually, this gruesome hack will allow you do hit ^L at any point in insert mode, it will clear the screen and keep your current line, you can return or continue editing from a cleared screen.

Download: ksh_vi_ctrl_l.patch

This patch is far from clean as it spawns tput(1) to avoid linking ksh to terminfo. I do not plan to submit this. A more elegant solution would be to allow bindings in 'vi' mode and allow external command calls from bindings.

Linux port

2009-06-01: OpenBSD's ksh is based on pdksh but unlike pdksh, it is still maintained. Because I got used to some new features and some interface improvements, I got frustrated with the default pdksh and started compiling OpenBSD's ksh on linux. The initial patch (June 2009) is available here but you are encouraged to use the following script, written by Šime Ramov.

UPDATE (2010-03-25): Easy to use script contributed by Šime Ramov.

Download: kshbuild.sh

Bertrand Janin <b@janin.com> · Powered by the spirit of the UNIX gods.