Re: [dev] [st] mouse usage, right click to plumb selection

From: Jérôme Andrieux <>
Date: Tue, 12 Sep 2017 14:56:11 +0200

On Tue, Sep 12, 2017 at 2:13 PM, Truls Becken <> wrote:
> Plumbing with cwd sounds interesting if it works reliably. I see that
> one has to configure
> ones shell specifically to output an escape code that the patched ST
> will recognize.

It was once done by descending the child pids from the terminal and
getting cwd from /proc/pid/cwd
It is both more generic and less portable.
I find the shell/OSC7 approach convenient.

> Question about the patch itself; why start a shell and construct a
> command that involves
> cd to change directory? Wouldn't a chdir() in the forked process suck
> less? Then exec
> plumber_cmd, sel.primary directly. Also the child pid variable seems
> unnecessary.

Sure, these are remains from different approaches to context passing :
chdir, cd'in in the command (sometimes, cd is just a builtin), ...

As I said, I am not sure whether to:

- chdir somehow and only pass the selection as argument, which makes
it easier to specify a generic plumber command
- pass cwd, sel.primary and eventually st pid as arguments, but that
would require some thoughts about how to serialize properly the list
of arguments, not to have issues with spaces, separators and so on.
Jérôme Andrieux
Received on Tue Sep 12 2017 - 14:56:11 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 12 2017 - 15:00:30 CEST