Scroll to navigation

eza_colors(5) File Formats Manual eza_colors(5)

NAME

eza_colors — customising the file and UI colours of eza

SYNOPSIS

The EZA_COLORS environment variable can be used to customise the colours that eza uses to highlight file names, file metadata, and parts of the UI.

You can use the dircolors program to generate a script that sets the variable from an input file, or if you don’t mind editing long strings of text, you can just type it out directly. These variables have the following structure:

A list of key-value pairs separated by `=', such as `*.txt=32'.
Multiple ANSI formatting codes are separated by `;', such as `*.txt=32;1;4'.
Finally, multiple pairs are separated by `:', such as `*.txt=32:*.mp3=1;35'.

The key half of the pair can either be a two-letter code or a file glob, and anything that’s not a valid code will be treated as a glob, including keys that happen to be two letters long.

For backwards compatibility EXA_COLORS environment variables is checked if EZA_COLORS is unset.

EXAMPLES

Disable the “current user” highlighting
Turn the date column green
Highlight Vagrantfiles
Override the existing zip colour
Markdown files a shade of green, log files a shade of grey

LIST OF CODES

LS_COLORS can use these ten codes:

directories
executable files
regular files
named pipes
sockets
block devices
character devices
symlinks
symlinks with no target

EZA_COLORS can use many more:

the permissions displayed as octal
the user-read permission bit
the user-write permission bit
the user-execute permission bit for regular files
the user-execute for other file kinds
the group-read permission bit
the group-write permission bit
the group-execute permission bit
the others-read permission bit
the others-write permission bit
the others-execute permission bit
setuid, setgid, and sticky permission bits for files
setuid, setgid, and sticky for other file kinds
the extended attribute indicator
the numbers of a file’s size (sets nb, nk, nm, ng and nt)
the numbers of a file’s size if it is lower than 1 KB/Kib
the numbers of a file’s size if it is between 1 KB/KiB and 1 MB/MiB
the numbers of a file’s size if it is between 1 MB/MiB and 1 GB/GiB
the numbers of a file’s size if it is between 1 GB/GiB and 1 TB/TiB
the numbers of a file’s size if it is 1 TB/TiB or higher
the units of a file’s size (sets ub, uk, um, ug and ut)
the units of a file’s size if it is lower than 1 KB/Kib
the units of a file’s size if it is between 1 KB/KiB and 1 MB/MiB
the units of a file’s size if it is between 1 MB/MiB and 1 GB/GiB
the units of a file’s size if it is between 1 GB/GiB and 1 TB/TiB
the units of a file’s size if it is 1 TB/TiB or higher
a device’s major ID
a device’s minor ID
a user that’s you
a user that’s root
a user that’s someone else
a group that you belong to
a group related to root
a group you aren’t a member of
a number of hard links
a number of hard links for a regular file with at least two
a new flag in Git
a modified flag in Git
a deleted flag in Git
a renamed flag in Git
a modified metadata flag in Git
an ignored flag in Git
a conflicted flag in Git
main branch of repo
other branch of repo
clean branch of repo
dirty branch of repo
“punctuation”, including many background UI elements
a file’s date
a file’s inode number
a file’s number of blocks
the header row of a table
the path of a symlink
an escaped character in a filename
the overlay style for broken symlink paths
special (not file, dir, mount, exec, pipe, socket, block device, char device, or link)
a mount point
a regular file that is an image
a regular file that is a video
a regular file that is lossy music
a regular file that is lossless music
a regular file that is related to cryptography (ex: key or certificate)
a regular file that is a document (ex: office suite document or PDF)
a regular file that is compressed
a regular file that is temporary (ex: a text editor’s backup file)
a regular file that is a compilation artifact (ex: Java class file)
a regular file that is used to build a project (ex: Makefile)
a regular file that is source code
the icon (this is optional, if not set the icon color matches the file name’s)
No security context on a file
SELinux user
SELinux role
SELinux type
SELinux level
BSD file flags

Values in EXA_COLORS override those given in LS_COLORS, so you don’t need to re-write an existing LS_COLORS variable with proprietary extensions.

LIST OF STYLES

Unlike some versions of ls, the given ANSI values must be valid colour codes: eza won’t just print out whichever characters are given.

The codes accepted by eza are:

1
for bold
2
for dimmed
3
for italic
4
for underline
31
for red text
32
for green text
33
for yellow text
34
for blue text
35
for purple text
36
for cyan text
37
for white text
90
for dark gray text
91
for bright red text
92
for bright green text
93
for bright yellow text
94
for bright blue text
95
for bright purple text
96
for bright cyan text
97
for bright text
38;5;nnn
for a colour from 0 to 255 (replace the nnn part)

Many terminals will treat bolded text as a different colour, or at least provide the option to.

eza provides its own built-in set of file extension mappings that cover a large range of common file extensions, including documents, archives, media, and temporary files. Any mappings in the environment variables will override this default set: running eza with LS_COLORS="*.zip=32" will turn zip files green but leave the colours of other compressed files alone.

You can also disable this built-in set entirely by including a reset entry at the beginning of EZA_COLORS. So setting EZA_COLORS="reset:*.txt=31" will highlight only text files; setting EZA_COLORS="reset" will highlight nothing.

AUTHOR

eza is maintained by Christina Sørensen and many other contributors.

Source code: https://github.com/eza-community/eza

Contributors: https://github.com/eza-community/eza/graphs/contributors

Our infinite thanks to Benjamin `ogham' Sago and all the other contributors of exa, from which eza was forked.

SEE ALSO

eza(1)
eza_colors-explanation(5)
$version