On 11 May 2012 16:57, Aaron Davies <[email protected]> wrote:
> i'd like to redefine ctrl-l to do what it does in bash--clear the screen.
>
> what i have so far is this, but it has (at least) two issues--it yanks back 
> the last kill even if there's nothing in the current command line, and it 
> pushes the "clear" into the history. is it possible to get rid of both of 
> those behaviors?
>
>> keybind $'\cl'   $'\cuclear\r\cy'

I use this in my ~/.kshrc:
------------
# swap <ESC><LF> with <LF> to make ksh93
# behave like bash
function swap_sh_echar_esclr_lf
{
        case "${.sh.edchar}" in
                $'\E\f') .sh.edchar=$'\f' ;;
                $'\f')   .sh.edchar=$'\E\f' ;;
        esac
}

trap swap_sh_echar_esclr_lf KEYBD
------------
Credits for this trick go to Roland Mainz

Lionel

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to