-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
access Cmd elements as an array of strings #21197
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've considered doing this a number of times.
Useful, but we are in feature freeze. |
Sure. We should probably branch after beta so that we can start merging features. The 1.0 release cycle will be very short already. |
Depends at what point waiting to merge features becomes more trouble than backporting all bugfixes. We have enough bugfixes continuing that I don't think we're there yet. |
We can also make bug fixes on the release branch and merged them forward to master. |
Now that there is a release-0.6 branch, can this be merged into master? |
merge? |
Currently, a
Cmd
is a rather opaque object: there is no way to "look inside" it without accessing undocumented fields of theCmd
object. I ran into this recently when I wanted a function of aCmd
to do something different depending on the program being executed.As a first step, this PR allows you to iterate and index a
Cmd
object as if it were an array of strings, e.g.:(This is just a thin wrapper around
cmd.exec
.)