aurora / rmate

Remote TextMate 2 implemented as shell script
GNU General Public License v3.0
887 stars 123 forks source link

Write saved content to stdout when editing stdin #38

Closed schinckel closed 9 years ago

schinckel commented 9 years ago

This allows you to do stuff like:

$ grep "search-string" foo | rmate --wait - | something-else

aurora commented 9 years ago

Interesting idea! I'll play around a little bit with it before merging.

ylluminate commented 9 years ago

:+1:

aurora commented 9 years ago

That's a very cool feature ... the only thing i wonder is:

currently the content will only be written to STDOUT if it get's saved at least one time. If you decide to close the editor without saving, you do not get the input to STDOUT ... i am not sure, if this behaviour is intended. What do you think?

schinckel commented 9 years ago

Yeah, that is deliberate: it matches the normal save behaviour.

Whatever was last saved is what gets written to stdout.

aurora commented 9 years ago

Ok, merged! Thanks very much!