Re: bash/xterm/(Home|End) Taste

From: Robert Lillack <rob(at)lillack.de>
Date: Thu, 29 Nov 2001 23:45:42 +0100

Oliver Fromme wrote:

> bindkey "^[[g" beginning-of-line
> bindkey "^[[h" end-of-line

für die bash habe ich das hier: (setzt auch den titel des xterms)
------
echo -n "setting keymappings for "
case $TERM in
        xterm*)
                [[ "$USER" == "root" ]] &&\
                echo -ne "\033]0;r o o t\007" ||\
                echo -ne "\033]0;Terminal-Emulation\007"
                echo -n "terminal emulation ("
                if [ "$COLORTERM" ]; then
                        echo -n "rxvt"
                        bind '"\C-h": backward-delete-char'
                        bind '"\e[3~": delete-char'
                        bind '"\e[7~": beginning-of-line'
                        bind '"\e[8~": end-of-line'
                else
                        echo -n "xterm"
                        bind '"\e[1~": beginning-of-line'
                        bind '"\e[3~": delete-char'
                        bind '"\e[4~": end-of-line'
                        bind '"\177": backward-delete-char'
                fi
                echo ")..."
                ;;
        cons*)
                echo "system console ($TERM)..."
                export COLORTERM=$TERM
                bind '"\C-?": delete-char' # DEL
                bind '"\C-h": backward-delete-char' # BACKSPACE
                bind '"\e[H": beginning-of-line' # HOME
                bind '"\e[F": end-of-line' # END

esac
echo
------

viel spass. rob.

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Thu 29 Nov 2001 - 23:44:54 CET

search this site