aboutsummaryrefslogtreecommitdiff
path: root/ksh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-06 19:44:47 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-06 19:44:47 +1300
commitf37c1c09bea09adc9e520d21b873ef2e38ebd958 (patch)
tree0b01e7fcd923699804ff0db8fce23d2006ef5cc0 /ksh
parentAdd "trackall" option to ksh (diff)
parentFound workable ^L bindings in all three kshes (diff)
downloaddotfiles-f37c1c09bea09adc9e520d21b873ef2e38ebd958.tar.gz
dotfiles-f37c1c09bea09adc9e520d21b873ef2e38ebd958.zip
Merge branch 'feat/ksh-bindings'
Diffstat (limited to 'ksh')
-rw-r--r--ksh/kshrc.d/bind.ksh21
1 files changed, 21 insertions, 0 deletions
diff --git a/ksh/kshrc.d/bind.ksh b/ksh/kshrc.d/bind.ksh
new file mode 100644
index 00000000..af024fb9
--- /dev/null
+++ b/ksh/kshrc.d/bind.ksh
@@ -0,0 +1,21 @@
+# Try to bind ^L to clear the screen
+case $KSH_VERSION in
+
+ *'93'*)
+ bind() {
+ case ${.sh.edchar} in
+ $'\f') .sh.edchar=$'\e\f' ;;
+ esac
+ }
+ trap bind KEYBD
+ ;;
+
+ *'MIRBSD KSH'*)
+ bind ^L=clear-screen
+ ;;
+
+ *'PD KSH'*)
+ bind -m '^L'='^U'clear'^J^Y'
+ ;;
+
+esac