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

lazy run modifiers #25

Open
jesteria opened this issue Aug 12, 2021 · 0 comments
Open

lazy run modifiers #25

jesteria opened this issue Aug 12, 2021 · 0 comments

Comments

@jesteria
Copy link
Member

jesteria commented Aug 12, 2021

The run modifiers supplied by argcmdr should vary from those of plumbum to permit lazy execution, and such that Local commands' output syntax needn't include tuples.

For example:

class PrintDir(Local):

    def prepare(self):
        return self.local.FG & self.local['ls']

The above is arguably clearer and more attractive syntactically than returning the tuple (self.local.FG, self.local['ls']).

In addition, the above syntax is closer (if not identical) to the use of run modifiers in plumbum.

(In the long run, the tuple syntax could also be deprecated, and eventually removed, simplifying that bit of argcmdr code.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant