You are not logged in.

#1 2009-09-05 18:42:46

playdafunkimuzic
Member
Registered: 2008-10-25
Posts: 220

URXVT Title issue and keybind issue (backspace, delete, etc.)

Hi,

Two questions:

1) I use zsh. How can I set the title of urxvt to be my current directory?

2) I'm having an issue in urxvt wih backspacing/deleting/end-of-line/beginning-of-line. What are the proper bindkey's for that?

Offline

#2 2009-09-06 00:35:38

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: URXVT Title issue and keybind issue (backspace, delete, etc.)

Here's straight from my ~/.zshrc file

# This sets the window title to the last run command.
[[ -t 1 ]] || return
case $TERM in
  *xterm*|rxvt|(dt|k|E|a)term)
    preexec () {
      print -Pn "\e]2;$1\a"
    }
  ;;
  screen*)
    preexec () {
      print -Pn "\e\"$1\e\134"
    }
  ;;
esac

# Setting HOME and END keys 
case $TERM in (xterm*|aterm|rxvt)
    bindkey '\e[H' beginning-of-line
    bindkey '\e[F' end-of-line ;;
esac

The preexec codes actually print out my last command. 

So, in order for it to do what you want, you would need to change:

case $TERM in
  *xterm*|rxvt|(dt|k|E|a)term)
    preexec () {
      print -Pn "\e]2;$1\a"
    }

to:

case $TERM in
  *xterm*|rxvt|(dt|k|E|a)term)
    preexec () {
      print -Pn "\e]2;%~\a"
    }

That should do it for ya.

Last edited by Knute (2009-09-06 00:57:18)


Knute

Offline

Board footer

Powered by FluxBB