How to Change the Mac tree Command Color

Asked 2 years ago, Updated 2 years ago, 36 views

I am using the tree command on Mac 10.12.6.
If you run it using the -C option,
by file type They will color-code it, but if you want to change this color,
There is no problem with configuring on Linux, but
In the case of mac, which file should I edit?
There seems to be no file in the directory below written in man.

/etc/DIR_COLORS System color database.

Also, the tree command is printed in a different color than the LSCOLORS I set myself.

macos

2022-09-29 22:28

1 Answers

It seems that the tree command does not come with the macOS itself, so I think it was installed on Homebrew or MacPorts, but is it not LSCOLORS but LS_COLORS?

↓ MacPorts tree(1) ↓

Tree is a recurring directory listing program that processes a depth indented
listing of files, which is colored aladircolors if the LS_COLORS environment
variable is set and output is to tty.

As it is written here, it seems to be colored without any options when outputting to the terminal.


2022-09-29 22:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.