gustavo-hms / luar

Script Kakoune using Lua
GNU Lesser General Public License v3.0
47 stars 3 forks source link

luar.kak: sh quoting; exec lua #18

Closed mralusw closed 3 years ago

mralusw commented 3 years ago

Just a few small quoting fixes (for paths containing spaces, * etc); also, exec lua at the end since there's no point in having a sh process waiting for nothing.

gustavo-hms commented 3 years ago

Hi, @mralusw ! Thanks for the contribution!

Would you mind to explain me what's the difference between calling the interpreter directly and via exec? I'm not that familiar with that...

mralusw commented 3 years ago

exec replaces the current process (sh) immediately with lua.

Calling lua as a final command forks, executes lua in the fork, and leaves the main sh process waiting for lua to exit... after which it exits itself, of course, since there are no further commands.

alexherbo2 commented 3 years ago

@mralusw Thanks for the tip!

gustavo-hms commented 3 years ago

Nice! I didn't know that!