简体   繁体   中英

Detect OSX Terminal Color Settings from the Command Line

In Mac OSX, one can change properties of the terminal via editor. These properties include text color, background color, and highlight color.

How can I detect what these properties have been set to for the terminal currently being used?

Is there some cache or file within "/Applications/Utilities/Terminal.app/Contents/Resources" that holds this information?

Thank you.

While you can find preferences as files , the actual colors which are used are in the Terminal application's memory .

Other applications may be able to ask the terminal for this information, eg, using escape sequences.

Terminal.app does not recognize the xterm control sequences that would return this information, nor does it (from review/reading) apparently support analogous escape sequences.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM