[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [screen-devel] [PATCH] process: add RC_ADOPTWD adopt working directo
From: |
vcaputo |
Subject: |
Re: [screen-devel] [PATCH] process: add RC_ADOPTWD adopt working directory |
Date: |
Wed, 8 Nov 2017 10:55:20 -0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Nov 08, 2017 at 06:48:22PM +0100, Amadeusz Sławiński wrote:
> On Tue, 31 Oct 2017 19:30:35 -0700
> Vito Caputo <address@hidden> wrote:
>
> > s is an RC_CHDIR convenience helper which discovers the working
> > directory of the foreground window.
>
> Hey,
>
> I'm not sure about this patch, seems to be overly linux specific to me.
>
> Also, you can have nested shells, which will probably make it behave in
> ways you don't expect it to behave (by changing to parent directory
> instead of childs).
>
> Amadeusz
Is there a way to achieve the same thing purely through runtime
configuration?
If not, perhaps just a minimum of extension can be done to make that
possible in a more OS-agnostic way.
Assigning a key to perform RC_CHDIR on a string acquired from an external
command which can be fed the PID of the foreground window's process through
a configurable format string is the kind of thing I'm imagining. Then in
my use case I'd just do the linux-specific assume-no-subshells /proc-based
introspection in the external command referenced in my config.
If this is already possible, please let me know, thanks.
Regards,
Vito Caputo