Hi Romildo,
On 01.07.2012 16:29, José Romildo Malaquias wrote:
> Hello.
>
> Suppose I have a window running rxvt-unicode. I would like to be able to
> have a new window running rxvt-unicode on the same directory of the
> current one.
With "current one", you probably mean the current *shell* running in
your terminal and not the cwd of the terminal itself?
Then you could write a simple perl plugin, using some hackery from the
selection plugin:
Track term's child (typically the shell):
----------------------------------------------------------------------
sub on_child_start {
my ($self,$pid) = @_;
$self->{child_pid} = $pid; # keep for later determining our shells
# CWD for relative path names
()
}
----------------------------------------------------------------------
Make use of this:
----------------------------------------------------------------------
...
my $ccwd = readlink("/proc/".$self->{child_pid}."/cwd");
// start new terminal here with parameter "-cd $ccwd"
...
----------------------------------------------------------------------
> Something like C-S-n on gnome-terminal.
>
> Is this easily achievable?
The obvious limitation is, that only the first shell level's path will
be detected. A nested bash or a nested mc's paths will not be seen.
HTH,
Martin
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode