Within .lldbinit, regex commands can be structured as a list of substitutions over
multiple lines. It's possible that this is uninentional, but it works and has
benefits.
For example:
command regex <command-name> s/pat1/repl1/ s/pat2/repl2/ ...
I use this form of command regex in my ~/.lldbinit, because it makes it
clearer to write and read compared to a single line definition, because
multiline substitutions don't need to be quoted, and are broken up one per line.
However, multiline definitions result in usage instructions being printed for
each use. The result is that every time I run lldb, I get a dozen or more
lines of noise. With this change, the instructions are only printed when
command regex is invoked interactively, or from a terminal, neither of which
are true when lldb is sourcing ~/.lldbinit.
Why do we need to check for a real terminal here? Isn't checking if it is interactive enough?