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

Add support for running shell commands as sub-operations #18

Closed
TheFriendlyCoder opened this issue Apr 24, 2018 · 2 comments
Closed

Add support for running shell commands as sub-operations #18

TheFriendlyCoder opened this issue Apr 24, 2018 · 2 comments
Assignees
Milestone

Comments

@TheFriendlyCoder
Copy link
Owner

Sometimes it is helpful to be able to run shell commands from the parent console / shell under which the friendly shell is running. We should look to add support for exposing console tools as built-in commands for the API.

One use case I can see is if someone wanted to query the host system to, say, get an IP address or host name of a service to connect to it'd be nice to run the command directly in Friendly Shell to get the result from the console without having to exit from the friendly shell and re-launch it again afterwards ... or having to launch a second console / terminal instance to run the command and copy-pasting the output back into friendly shell.

@TheFriendlyCoder
Copy link
Owner Author

To maintain some compatibility / familiarity with the 'cmd' builtin module, we should make commands that start with an exclamation mark references to shell commands, spawning sub-processes to run the shell commands.

@TheFriendlyCoder
Copy link
Owner Author

To facilitate integration with the Friendly Shell IO subsystem we should use subprocesses to capture output produced by the shell command and redirect it to the appropriate output streams.

@TheFriendlyCoder TheFriendlyCoder self-assigned this Apr 27, 2018
TheFriendlyCoder added a commit that referenced this issue Apr 28, 2018
Fixes #18 Added support for shell commands
@TheFriendlyCoder TheFriendlyCoder added this to the 1.0.0 milestone May 7, 2018
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

No branches or pull requests

1 participant