String (@NotNull String parameter, boolean isWinShell) { String s = StringUtil.convertLineSeparators(parameter, ""); if (s.isEmpty()) return QQ; boolean hadLineBreaks = !s.equals(parameter); String result = isWinShell ? escapeParameter(s, new QuoteFlag(hadLineBreaks), 1, true) : backslashEscapeQuotes(s); if (hadLineBreaks) result = quote(result, Q); return result; }