c9 open command to with pipe


#1

Ok , a cool a way to pipe data into a ace-editor tab.

$ git diff file.php | c9 open --pipe --syntax=diff

so that way i can view the data out of terminal without to save the data to a file then opening with c9 open.


#2

May I suggest that you add this feature to this plugin: https://github.com/c9/core/blob/master/plugins/c9.cli.open/open.js

We would accept a pull request for that.


#3

I got this… Already figured it out :stuck_out_tongue:

Just have to figure out how to pull c9 core and edit and run tests…

Edit:

I pose a question to @javruben and @bmatusiak

Do you want the data being piped in to load into the editor in realtime, or load in at process end? Should we set a flag to allow both features, maybe --stream?


#5

I would suggest to always stream it. The stream will end when the pipe is done, so no need to add another flag.


#6

So when doing an edge test on it I found it interesting that I could just do:

c9 open --pipe

Then type in the console and hit enter and it would log that text into the editor. I’m not sure if this is a bad thing or not… It is still correctly piping data from the console in, but do we want this ability to be there?

Edit: Btw I finished the code, just doing testing now.


#7

Pull Request submitted: https://github.com/c9/core/pull/248