-
Notifications
You must be signed in to change notification settings - Fork 121
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
stdin redirection? #1036
Comments
@laf0rge Thanks for the suggestions. Certainly the ability to pipe the output a a shell command or cmd2 command into another cmd2 command would be useful and we already have issue #978 that covers that suggestion. The ability to use stdin redirection is a separate request and we can look into the possibility and keep this issue open for that. Actually, a long time ago cmd2 had this capability, but nobody was using it and when we rearchitected it to use a much higher performance command parser we removed the stdin redirection capability because it made the parsing logic simpler and faster. But we can revist the possibility of adding it back. Perhaps there is a smart and efficient way to do it which we hadn't considered previously. |
I was quite excited when I heard that this issue was closed, and the feature already implemented.. However, looking at the actual code changes linked here, I think there was a mistake. I cannot find any stdin related code in it? |
@laf0rge We would welcome PRs to implement this feature, but it's not a feature that any of the core |
it's very nice that one can redirect the output of some command to a file.
However, in order to have symmetric operation, one would also have to be able to use stdin redirection, i.e. start a command which then receives stdin from a file.
stdin from a file is one step, the second - even better - step would be the ability to 'pipe' the output of a shell command into the stdin of a built-in cmd2 command.
The text was updated successfully, but these errors were encountered: