aboutsummaryrefslogtreecommitdiff
path: root/ksh/kshrc.d/bind.ksh
blob: e32b9565ca0644cb356a8b07f9f11f7ad2359b5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Try to bind ^L to clear the screen
case $KSH_VERSION in

    # Works great
    *'MIRBSD KSH'*)
        bind ^L=clear-screen
        ;;

    # Works great
    *'93'*)
        bind() {
            case ${.sh.edchar} in
                $'\f') .sh.edchar=$'\e\f' ;;
            esac
        }
        trap bind KEYBD
        ;;

    # Works pretty well, but only on an empty line
    *'PD KSH'*)
        bind -m '^L'=clear'^J'
        ;;
esac