Re: [dev][dwm] Launching new terminals in $PWD

From: Alexander S. <alex0player_AT_gmail.com>
Date: Fri, 18 Oct 2013 15:05:36 +0400

2013/10/18 Raphaël Proust <raphlalou_AT_gmail.com>:
> On Fri, Oct 18, 2013 at 11:28 AM, Manolo Martínez
> <manolo_AT_austrohungaro.com> wrote:
>> On 10/18/13 at 06:12pm, Chris Down wrote:
>>> On 2013-10-18 12:03, Manolo Martínez wrote:
>>> Environments only propagate to children, not their parents. You'll need to get
>>> the pwd of the currently focussed window if you want to do that.
>>>
>>
>> You meant "the pwd of the children of the currently focused window",
>> right? I've just seen that the pwd of urxvt is always my home directory,
>> even if the pwd of the shell process running in it is not. This is all
>> pretty arcane to me.
>
> AFAIU: if you `cd` in urxvt, the pwd of the urxvt process will change.
> If you `vim` and then `:cd` then pwd of the urxvt process will not
> change (i.e. the parent process (urxvt) keeps its pwd, while the child
> process (vim) will have a new pwd).
The "parent process" is shell, not the terminal. Terminal needs
explicit support to keep its pwd consistent with its shell's.
By the way, pwdx can be replaced by readlink("/proc/<pid>/cwd").
Received on Fri Oct 18 2013 - 13:05:36 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 18 2013 - 13:12:15 CEST