Skip to content

Commit 272f395

Browse files
hboutemygnodet
authored andcommitted
added details on redirection to a file
1 parent e2ac629 commit 272f395

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jansi/src/main/java/org/fusesource/jansi/AnsiMain.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@
4040
* support natively ANSI escape sequences like any Unix terminal,</li>
4141
* <li>on Windows, cmd.exe, PowerShell or Git-cmd terminals should get <code>WINDOWS</code> mode.</li>
4242
* </ul>
43-
* The results will vary if you play with <code>jansi.passthrough</code>, <code>jansi.strip</code> or
43+
* If stdout is redirected to a file (<code>&gt; out.txt</code>), System.out should switch to <code>STRIP_ANSI</code>.
44+
* Same for stderr redirection (<code>2&gt; err.txt</code>) which should affect System.err mode.
45+
* <p>The results will vary if you play with <code>jansi.passthrough</code>, <code>jansi.strip</code> or
4446
* <code>jansi.force</code> system property, or if you redirect output to a file.
4547
* <p>If you have a specific situation that is not covered, please report precise conditions to reproduce
4648
* the issue and ideas on how to detect precisely the affected situation.
49+
* @see AnsiConsole
4750
*/
4851
public class AnsiMain {
4952
public static void main(String... args) throws IOException {

0 commit comments

Comments
 (0)