Capture Command Output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Do Plugins |
New
|
Wishlist
|
Unassigned |
Bug Description
It would be useful to have an action, perhaps titled "Run Capturing Output", that would capture the stdout of a command run by Do and place it into the Selected Text buffer or perhaps a special buffer of its own.
With this output of arbitrary commands and scripts would be available to use as input on any Do object. In concept the way Do can pass objects around is a little like a pipe, and this is basically piping stdout into Do. Both UNIX and Do are so powerful because of this piping mechanism.
I can see a couple of problems with this, though:
1) Many commands take user input on stdin that Do will not be able to provide, leaving the process running. Maybe if Do were to fork a process requesting input the the Terminal this would solve that problem. Basically fall back on the Run in Terminal command from the GNOME-Terminal plugin.
2) Some commands will run for a long time, and if Do is tied up waiting for it to exit, the user cannot use it. There may be some way to either do the magic fall back to Terminal thing if a command continues for longer than a minute or two, or to fork the process and allow Do to be used while the command is running, putting the output into a buffer for later use.
---
This feature request based on this mailing list post:
Changed in do-plugins: | |
importance: | Undecided → Wishlist |
Another idea I just had: have a shell command that you can use from the shell to pipe data into Do. Something like this:
uname -r | do-capture
This would put the stdout of uname -r, or any other arbitrary command, into Do's capture buffer.
-Josh