2023-09-27 21:43:18 +00:00
% eza_colors(5) $version
2020-10-13 19:19:00 +00:00
2023-07-29 12:19:05 +00:00
<!-- This is the eza_colors(5) man page, written in Markdown. -->
2020-10-13 19:19:00 +00:00
<!-- To generate the roff version, run `just man` , -->
<!-- and the man page will appear in the ‘ target’ directory. -->
NAME
====
2023-07-29 12:19:05 +00:00
eza_colors — customising the file and UI colours of eza
2020-10-13 19:19:00 +00:00
SYNOPSIS
========
2023-09-19 07:04:13 +00:00
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.
2020-10-13 19:19:00 +00:00
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.
2023-10-02 12:27:36 +00:00
For backwards compatibility `EXA_COLORS` environment variables is checked if `EZA_COLORS` is unset.
2023-09-19 07:04:13 +00:00
2020-10-13 19:19:00 +00:00
EXAMPLES
========
2023-09-19 07:04:13 +00:00
`EZA_COLORS="uu=0:gu=0"`
2020-10-13 19:19:00 +00:00
: Disable the “current user” highlighting
2023-09-19 07:04:13 +00:00
`EZA_COLORS="da=32"`
2020-10-13 19:19:00 +00:00
: Turn the date column green
2023-09-19 07:04:13 +00:00
`EZA_COLORS="Vagrantfile=1;4;33"`
2020-10-13 19:19:00 +00:00
: Highlight Vagrantfiles
2023-09-19 07:04:13 +00:00
`EZA_COLORS="*.zip=38;5;125"`
2020-10-13 19:19:00 +00:00
: Override the existing zip colour
2023-09-19 07:04:13 +00:00
`EZA_COLORS="*.md=38;5;121:*.log=38;5;248"`
2020-10-13 19:19:00 +00:00
: Markdown files a shade of green, log files a shade of grey
LIST OF CODES
=============
`LS_COLORS` can use these ten codes:
`di`
: directories
`ex`
: executable files
`fi`
: regular files
`pi`
: named pipes
`so`
: sockets
`bd`
: block devices
`cd`
: character devices
`ln`
: symlinks
`or`
: symlinks with no target
2023-09-19 07:04:13 +00:00
`EZA_COLORS` can use many more:
2020-10-13 19:19:00 +00:00
2023-09-17 21:35:25 +00:00
`oc`
: the permissions displayed as octal
2020-10-13 19:19:00 +00:00
`ur`
: the user-read permission bit
`uw`
: the user-write permission bit
`ux`
: the user-execute permission bit for regular files
`ue`
: the user-execute for other file kinds
`gr`
: the group-read permission bit
`gw`
: the group-write permission bit
`gx`
: the group-execute permission bit
`tr`
: the others-read permission bit
`tw`
: the others-write permission bit
`tx`
: the others-execute permission bit
`su`
: setuid, setgid, and sticky permission bits for files
`sf`
: setuid, setgid, and sticky for other file kinds
`xa`
: the extended attribute indicator
`sn`
2023-09-17 19:00:12 +00:00
: the numbers of a file’ s size (sets `nb` , `nk` , `nm` , `ng` and `nt` )
2020-10-13 19:19:00 +00:00
`nb`
: the numbers of a file’ s size if it is lower than 1 KB/Kib
`nk`
: the numbers of a file’ s size if it is between 1 KB/KiB and 1 MB/MiB
`nm`
: the numbers of a file’ s size if it is between 1 MB/MiB and 1 GB/GiB
`ng`
: the numbers of a file’ s size if it is between 1 GB/GiB and 1 TB/TiB
`nt`
: the numbers of a file’ s size if it is 1 TB/TiB or higher
`sb`
2023-09-17 19:00:12 +00:00
: the units of a file’ s size (sets `ub` , `uk` , `um` , `ug` and `ut` )
2020-10-13 19:19:00 +00:00
`ub`
: the units of a file’ s size if it is lower than 1 KB/Kib
`uk`
: the units of a file’ s size if it is between 1 KB/KiB and 1 MB/MiB
`um`
: the units of a file’ s size if it is between 1 MB/MiB and 1 GB/GiB
`ug`
: the units of a file’ s size if it is between 1 GB/GiB and 1 TB/TiB
`ut`
: the units of a file’ s size if it is 1 TB/TiB or higher
`df`
: a device’ s major ID
`ds`
: a device’ s minor ID
`uu`
: a user that’ s you
2023-09-28 09:13:31 +00:00
`uR`
: a user that's root
2020-10-13 19:19:00 +00:00
`un`
: a user that’ s someone else
`gu`
: a group that you belong to
2023-09-28 09:13:31 +00:00
`gR`
2023-10-02 12:27:36 +00:00
: a group related to root
2023-09-28 09:13:31 +00:00
2020-10-13 19:19:00 +00:00
`gn`
: a group you aren’ t a member of
`lc`
: a number of hard links
`lm`
: a number of hard links for a regular file with at least two
`ga`
: a new flag in Git
`gm`
: a modified flag in Git
`gd`
: a deleted flag in Git
`gv`
: a renamed flag in Git
`gt`
: a modified metadata flag in Git
2023-08-13 12:53:36 +00:00
`gi`
: an ignored flag in Git
2023-09-17 21:35:25 +00:00
`gc`
: a conflicted flag in Git
2023-10-02 09:20:28 +00:00
`Gm`
: main branch of repo
`Go`
: other branch of repo
`Gc`
: clean branch of repo
`Gd`
: dirty branch of repo
2020-10-13 19:19:00 +00:00
`xx`
: “punctuation”, including many background UI elements
`da`
: a file’ s date
`in`
: a file’ s inode number
`bl`
: a file’ s number of blocks
`hd`
: the header row of a table
`lp`
: the path of a symlink
`cc`
: an escaped character in a filename
`bO`
: the overlay style for broken symlink paths
2023-09-17 21:35:25 +00:00
`sp`
: special (not file, dir, mount, exec, pipe, socket, block device, char device, or link)
2023-09-05 12:26:45 +00:00
`mp`
: a mount point
2023-09-11 05:36:40 +00:00
`im`
2023-09-11 15:37:18 +00:00
: a regular file that is an image
2023-09-11 05:36:40 +00:00
`vi`
2023-09-11 15:37:18 +00:00
: a regular file that is a video
2023-09-11 05:36:40 +00:00
`mu`
2023-09-11 15:37:18 +00:00
: a regular file that is lossy music
2023-09-11 05:36:40 +00:00
`lo`
2023-09-11 15:37:18 +00:00
: a regular file that is lossless music
2023-09-11 05:36:40 +00:00
`cr`
2023-09-11 15:37:18 +00:00
: a regular file that is related to cryptography (ex: key or certificate)
2023-09-11 05:36:40 +00:00
`do`
2023-09-11 15:37:18 +00:00
: a regular file that is a document (ex: office suite document or PDF)
2023-09-11 05:36:40 +00:00
`co`
2023-09-18 21:12:50 +00:00
: a regular file that is compressed
2023-09-11 05:36:40 +00:00
`tm`
2023-09-11 15:37:18 +00:00
: a regular file that is temporary (ex: a text editor's backup file)
2023-09-11 05:36:40 +00:00
`cm`
2023-09-11 15:37:18 +00:00
: a regular file that is a compilation artifact (ex: Java class file)
2023-09-11 05:36:40 +00:00
2023-09-11 15:37:18 +00:00
`bu`
: a regular file that is used to build a project (ex: Makefile)
2023-09-11 05:36:40 +00:00
2023-10-18 08:23:58 +00:00
`sc`
: a regular file that is source code
2023-09-17 21:35:25 +00:00
`Sn`
: No security context on a file
`Su`
: SELinux user
`Sr`
: SELinux role
`St`
: SELinux type
`Sl`
: SELinux level
2023-12-01 07:43:15 +00:00
`ff`
: BSD file flags
2020-10-13 19:19:00 +00:00
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
==============
2023-07-29 12:19:05 +00:00
Unlike some versions of `ls` , the given ANSI values must be valid colour codes: eza won’ t just print out whichever characters are given.
2020-10-13 19:19:00 +00:00
2023-07-29 12:19:05 +00:00
The codes accepted by eza are:
2020-10-13 19:19:00 +00:00
`1`
: for bold
2023-09-18 03:43:04 +00:00
`2`
: for dimmed
`3`
: for italic
2020-10-13 19:19:00 +00:00
`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
2023-09-10 17:17:44 +00:00
`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
2020-10-13 19:19:00 +00:00
`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.
2023-07-29 12:19:05 +00:00
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.
2020-10-13 19:19:00 +00:00
2023-09-19 07:04:13 +00:00
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.
2020-10-13 19:19:00 +00:00
AUTHOR
======
2023-07-29 12:19:05 +00:00
eza is maintained by Christina Sørensen and many other contributors.
2020-10-13 19:19:00 +00:00
2023-08-14 14:40:01 +00:00
**Source code:** `https://github.com/eza-community/eza` \
**Contributors:** `https://github.com/eza-community/eza/graphs/contributors`
2023-07-29 12:19:05 +00:00
Our infinite thanks to Benjamin ‘ ogham’ Sago and all the other contributors of exa, from which eza was forked.
2020-10-13 19:19:00 +00:00
SEE ALSO
========
2023-08-04 03:54:23 +00:00
- [eza.1.md ](eza.1.md )
2023-08-04 04:04:28 +00:00
- [eza_colors-explanation.5.md ](eza_colors-explanation.5.md )