Only echo the link if stdout is not a terminal

Makes sense for scripting.