outputInTerminalForCommand: used to detect brew and port prefixes