Re: [code] [textadept] Experimental os.spawn

From: Mitchell <m.att.foicica.com>
Date: Mon, 15 Oct 2018 22:23:58 -0400 (EDT)

Hi,

On Sun, 14 Oct 2018, Mitchell wrote:

> Hi,
>
> I've just checked in an experimental change[1] that renames `_G.spawn()` to
> `os.spawn()` and also merges it into the Lua source as a patch. Not only does
> this reduce Textadept's external dependencies, but I think it will make it
> easier for me in terms of maintenance. For compatibility, you can put
>
> if not spawn then spawn = os.spawn end
>
> in your *~/.textadept/init.lua* going forward.

In addition, I checked in another change[2] that makes the `cwd` (second) parameter truly optional in that like the `env` (third) parameter, it can and should be omitted instead of `nil`. You can now do something like this:

   os.spawn('command', ui.print) -- asynchronously prints stdout

Cheers,
Mitchell

[2]: https://foicica.com/hg/textadept/rev/6a0353544b0c

>
> Cheers,
> Mitchell
>
> [1]: https://foicica.com/hg/textadept/rev/a04309372a8e
>

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 Mon 15 Oct 2018 - 22:23:58 EDT

This archive was generated by hypermail 2.2.0 : Tue 16 Oct 2018 - 06:52:02 EDT