Re: [go-nuts] Lazy Bash redirection

2017-08-26 Thread juicemia
Thanks! I'll have a look at those. On Saturday, August 26, 2017 at 3:33:31 AM UTC-4, Jakob Borg wrote: > > I think your best bet is to open a TTY manually when you detect that > stdout is not a tty. You can use for example > https://github.com/mattn/go-isatty to determine this. An > `os.Open("/

Re: [go-nuts] Lazy Bash redirection

2017-08-26 Thread Hugo Torres
Thanks. I'll check out those tools now. On Sat, Aug 26, 2017 at 3:33 AM Jakob Borg wrote: > I think your best bet is to open a TTY manually when you detect that > stdout is not a tty. You can use for example > https://github.com/mattn/go-isatty to determine this. An > `os.Open("/dev/tty")` might

Re: [go-nuts] Lazy Bash redirection

2017-08-26 Thread Jakob Borg
I think your best bet is to open a TTY manually when you detect that stdout is not a tty. You can use for example https://github.com/mattn/go-isatty to determine this. An `os.Open("/dev/tty")` might be enough, otherwise a package like https://github.com/mattn/go-tty shows some of the setup you m

[go-nuts] Lazy Bash redirection

2017-08-25 Thread juicemia
Hi everybody. I don't know if this question has been asked before, partially because I don't really even know what to call what I'm trying to do. The best I can come up with is that I'm trying to do lazy redirection in bash but I'm having some trouble. A concrete example should help explain: