Extension to open new terminal with same working directory
Benjamin R. Haskell
rxvt-unicode at benizi.com
Wed Sep 15 20:13:24 CEST 2010
On Wed, 15 Sep 2010, David House wrote:
> Hi,
>
> I'd like M-S-RET to open a new terminal with the same working
> directory as the old buffer. Has anyone written an extension to do
> this, or is this possible in vanilla urxvt?
This should probably be done in your shell (which is the part of the
chain that is in the working directory). E.g. for Zsh (overly-verbose
example -- and not sure how to get the '-S-' portion):
function open-urxvt-here () { urxvt &! }
zle -N open-urxvt-here
bindkey '\e^J' open-urxvt-here
Possibly better, you can do this via ~/.Xdefaults, but it still operates
via your shell:
URxvt.keysym.M-S-Return: \ urxvt\ &!\012
The leading space ('\ ') keeps it out of history.
The '\012' specifies the trailing 'Return'.
Still Zsh-specific (the '&!' means to disown the job immediately), but
probably Bashable by chopping off the '!'.
--
Best,
Ben
More information about the rxvt-unicode
mailing list