I tried to redirect the output of my application to a file and I got an error "standard output is not a terminal" (errNotTerminalOutput) from Prompt()
A couple of options:
easy one: change errNotTerminalOutput to ErrNotTerminalOutput so I have something to compare against (and I can add some code so that instead of using Prompt() I read a line from stdin.
still easy: add a method I can call (State.IsTerminalOutput) so I can use it to decide if calling Prompt() or not
complicated ? have Prompt() support "non terminal output" and do a read line from stdin (that, I think, is what libreadline does).
I tried to redirect the output of my application to a file and I got an error "standard output is not a terminal" (errNotTerminalOutput) from Prompt()
A couple of options:
Thanks! -- Raffaele