Capture Command Output

Bug #348291 reported by Joshua Gardner
4
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:

Revision history for this message
Joshua Gardner (cellofellow) wrote :

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

Robert Dyer (psybers)
Changed in do-plugins:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.