Skip to content

Add a new shell_out that works with AST-commands #235

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

aaronbog
Copy link
Collaborator

This pull request contains two main parts.

  1. the commandAST folder
  • Nodes contain all of the data structures used to create our AST
  • Visitors are full of example visitors
  • abstractTypes file exists to counter circular dependency issues in Python
  • command.py contains a piece of code called command that will convert string-based commands over to the AST variant
  • test.py shows the command.py functioning
  • visitor.py contains syntactic sugar to make the visitors more usable. There is also a set of use case examples.
  1. an implementation of the shell called ast_shell_out.py
  • this is a backwards compatible shell_out function.
  • there do seem to be some small bugs left regarding the return time and return codes of ssh commands.
  • at the bottom of the file you can see the three ways you can provide commands to this function.

@aaronbog aaronbog marked this pull request as draft May 20, 2025 19:01
@aaronbog aaronbog added enhancement New feature or request shellout Changes to the internal of executing something on the shell; planned labels May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned shellout Changes to the internal of executing something on the shell;
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant