Apart form these problems, there is no way to find the cwd of another
process on unix in general, even if you *knew* the process.
I see your point about not being able to query the shell's CWD.
But doesn't urxvtd have a CWD of /home/muresan, since I started it from
the command line? And can't urxvtd start all its urxvtc's with that CWD
(instead of /) ? This would be a more useful default...
The right solution is to teach your shell to tell urxvt about the cwd and
use that in your extension (for example, by setting an x-property via a
command sequence and querying that before opening a window).
Hm... I know PS1 can change a terminal's title to the CWD, so there may
be some convoluted way to achieve this.
However I'd be happy if urxvtd just started all its children with a CWD
equal to its own original CWD (the one urxvtd had when it started).
new urxvt::term
Would that re-use the urxvtd associated with the current terminal?
Yes, but it works just as well within urxvt, both support multiple
terminal windows from a single process.
If urxvt::term starts a new terminal window in the same process, please
add that to the documentation. It currently says it acts "very similar
as if you had started it with system()".
Apart from this, it looks like "new urxvt::term" needs an envhashref
argument, which I'm not sure how to prepare (would be nice if it just
defaulted to the current terminal's environment).
Thanks,
Dan
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode