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

Adding Linux-style command chaining #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

caseyriebe
Copy link

I've been using this package for some time in a work project where we need to make a custom shell for end-users to lock down everything, save for a few necessary commands, and to make in more Linux/Unix-like I added command chaining into my shell.

It supports both AND && and OR || chains, and multiple combinations of each. I can write tests for them if desired. Although, I can tell you from usage that it works well.

It does require the saving of the return_code of the command in the global core context, but that was a 2 line change in core.py.

I am happy to answer any other questions or provide a demo, if needed.

Great project! Glad I can contribute something!

@caseyriebe
Copy link
Author

Also, when I ran build.sh all of the tests that needed cli_runner fixture failed. I wasn't sure where that was suppose to be pulled from, so I added a conftest.py and imported the click.testing.CliRunner() and served it out of the fixture for the tests. They all passed after that.

@plasorak
Copy link

Any news if/when this could be merged? This could be very useful (by the way, I couldn't get the OR version to work).

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.

2 participants