Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 199 exec(command) function #209

Closed
wants to merge 11 commits into from
Closed

Issue 199 exec(command) function #209

wants to merge 11 commits into from

Conversation

ntwrick
Copy link
Contributor

@ntwrick ntwrick commented Apr 10, 2019

Here is my proposal for an exec(command) builtin function to solve issue #199.

Considering that implementing a builtin function does not require new lexical support and that exec(command) is similar to what linux C libs provide and the golang exec module supports, it seems to me that this model is reasonably expressive as well as easy to implement.

See tests/test-exec.abs as example of an abs script that marshalls args for a an interactive editor and then executes it with live stdIO. This works in both linux with nano and win10 with notepad. It also works for commands in linux that terminate with & which means we can launch a true daemon process in the background as well.

As a bonus, the $var command string interpolation code has been moved to the util module where it can be shared by regular commands as well as exec commands.

@ntwrick ntwrick self-assigned this Apr 10, 2019
@ntwrick
Copy link
Contributor Author

ntwrick commented Apr 10, 2019

Redo against branch 1.3.x.

@ntwrick ntwrick closed this Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants