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

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

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

    *'PD KSH'*)
        bind -m '^L'='^Uclear^J^Y'
        ;;

esac