Re: [code] [textadept] Curses `os.spawn` Shell String Parsing

From: Mitchell <m.att.foicica.com>
Date: Thu, 13 Dec 2018 22:14:50 -0500 (EST)

Hi Chad,

On Wed, 12 Dec 2018, Chad Voegele wrote:

> Hi Mitchell,
>
> I use `sed` with `filter_through` for search and replace and have been
> having trouble when trying to replace single quotes with double
> quotes, i.e. `filter_through('sed "s/\'/\\"/g"')`. I narrowed the
> issue to an implementation difference where the curses version uses
> custom logic to parse the shell string. Lines 807-817 in the patched
> `loslib.c` seem to have trouble with the escaped double quote.
>
> Since I'm guessing you would not like to have a `glib` dependency in
> the curses version, one option to fix this could be to use the POSIX
> function `wordexp` provided by `libc`. Please see the patch below for
> details. Would you be willing to consider adopting this patch or
> something similar?
>
> [snip]

This looks good to me. I'll apply something similar when I have some time. Thanks!

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 13 Dec 2018 - 22:14:50 EST

This archive was generated by hypermail 2.2.0 : Fri 14 Dec 2018 - 06:49:55 EST