Skip to content

How to get the raw ANSI output in terminal #3597

Closed Answered by Zhengqbbb
peterroe asked this question in Q&A
Discussion options

You must be logged in to vote

Adding a few points


1 FORCE_COLOR

COMMAND

  • Does it support removing colors in non-interactive mode?
  • Does it support outputting color characters in FORCE_COLOR forced in non-interactive mode?
  • Does it output to stderr?

Example:

FORCE_COLOR=true COMMAND >foo.ansi 2>&1
Code.mp4

2 Using the script command to record commands

  • Use control+d to exit recording
  • Please note that the output files of the script command are different for Linux and MacOS.
  • Capture in the product file
Code1.mp4

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@peterroe
Comment options

Comment options

You must be logged in to vote
1 reply
@peterroe
Comment options

Answer selected by peterroe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants