* Gabriel Fernández <[EMAIL PROTECTED]> [07/06/05 00:41]: > > El Lun 06 Jun 2005 17:57, Pingveno escribió: > > In zsh, I'd like to use the "Home", "Delete" and "End" key to get to the > > beginning of a line, do forward delete, and get to the end of the line. > > However, I only see a "~" character entered. Any fix? > > > > -- > > Linux User #340304 > you have to put something like that in your .zshrc > > #Rebind HOME and END to do the decent thing: > bindkey '^[[H' beginning-of-line > bindkey '^[[F' end-of-line > case $TERM in (xterm*) > bindkey '\eOH' beginning-of-line > bindkey '\eOF' end-of-line > esac
You can also use the zkbd function to refer to keys by name rather than using the escape sequences: source ~/.zkbd/$TERM-$VENDOR-$OSTYPE bindkey $key[End] end-of-line etc. This has the advantages that it is clearer and terminal independent. See man zshcontrib and search for 'zkbd' for details. HTH Moshe
pgp4zz6JvZ4Fz.pgp
Description: PGP signature