We discussed a non-portable way to do that in 2012 here: http://lists.schmorp.de/pipermail/rxvt-unicode/2012q3/001607.html
I am using something something similar in a custom selection-popup plugin to open files that are highlighted. It breaks down as soon as you have nested sessions of any forms (nested shells, midnight commander etc.) with different CWDs, but is sensibly useful otherwise. HTH, Martin On 16.09.2017 20:25, Marc Lehmann wrote: > On Thu, Sep 14, 2017 at 04:38:14PM +0000, Adesh Kumar <[email protected]> > wrote: >> can press Ctrl+Shift+N to open a new terminal. The new window opened >> this way inherits its current working directory from the parent window, >> which is highly useful. > > First of all, this simply cannot be done without support from the program > running inside the terminal - while some operating systems allow > you to query the current working directory of other processes, this cannot be > done portably, and, whats more, there can be multiple programs running inside > a terminal all with their own cwd. > > For example, try this in gnome terminal: > > $ cd /tmp > $ bash > $ cd / > [ctrl-shift-n] > > The new terminal will not open with the CWD set to /, but probably to > /tmp. > > This is the reason why urxvt does not support this out of the box - opening > a new terminal would be as good as simply starting it again, so this option > isn't really needed. > > Now, what gnome-terminal and others do on e.g. Linux could be done with > a linux-specific extension that, of course, would have to be written > first (it could also be done in other ways, but doing an extension would > probably be most painless). > > So yes, there is no such functionality in urxvt out of the box, and none > planned, as urxvt tries to be portable. > _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/rxvt-unicode
