I found an alternative shortly after:
r = "echo '#{ h.inspect }'"
`#{ r } | bbedit`
r is a hash.
Cheers
On Wednesday, January 10, 2018 at 11:53:12 AM UTC-5, Sam Hathaway wrote:
>
> IO.popen("bbedit", "w") do |subproc|
> subproc.puts("string for bbedit")
> subproc.closeend
>
> On 9 Jan 2018, at 17:54, BeeRich33 wrote:
>
> Hiya folks.
>
> Just wondering if anybody knows how to pipe a ruby string to bbedit. Once
> in a while I'd like to send the output of a ruby script to bbedit.
> Obviously this would open in an untitled text file, unsaved. I have the
> bbedit command line tools installed, and I pipe other stuff to bbedit.
> Great tools actually.
>
> I'm currently trying this:
>
> system ('echo "#{ puts h }" | bbedit')
>
> Result:
>
> #{ puts h }
>
> So I reversed the quotations:
>
> system ("echo '#{ puts h }' | bbedit")
>
>
> ...which outputs nothing.
>
> So backticks:
>
> `echo '#{ puts h }' | bbedit`
>
>
> Also results in nothing. Tried double quotations, nothing.
>
> Without creating a temp file and some fancy workaround in the
> filesystem/bash, is this possible? Any insight appreciated.
>
> Cheers
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "[email protected] <javascript:>" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/bbedit.
>
>
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.