Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

No way to issue subcommands #2

Open
mathrick opened this issue Nov 11, 2015 · 0 comments
Open

No way to issue subcommands #2

mathrick opened this issue Nov 11, 2015 · 0 comments

Comments

@mathrick
Copy link

There's no real way to issue subcommands (a'la svn/git), other than by passing them all as parameters into the call. That means there's a strong asymmetry in the syntax:

so.git.help()

vs

so.git("commit", "--help")

I don't see a good way to fix that with the current structure of the API, but I think remodelling it would allow mapping things in a way that's more consitent:

so.ls()
so.ls["-l"]()
so.ls["--color":"always"]()
so.git.commit["--help"]()
# or perhaps better as
so.git["commit"]["--help"]
so.git["ls-files"]["--help"]

By abusing slices, ShellOut could get have a syntax for specifying the values of non-boolean options.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant