Skip to content
/ zeza Public

A zsh plugin for managing and customizing eza, the very colorful ls replacement.

License

Notifications You must be signed in to change notification settings

duggum/zeza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zeza plugin

A Z Shell (zsh) plugin for managing and customizing 'eza', the very colorful 'ls' replacement. View the install guide to get it for your operating system.

eza default demo

Version

  • Plugin: 1.0.1
  • Updated for eza: 0.17.3

Table of Contents

Features

While eza needs nothing more than the EZA_COLORS environment variable to customize its color configuration, this plugin provides a few extra conveniences for a more complete eza experience, such as:

  1. an easy to read color configuration file,
  2. a few sensible aliases, and
  3. several helpful commands to manage eza

Installation

Oh My Zsh

  1. Clone the repository to .oh-my-zsh/custom/plugins or $ZSH_CUSTOM
git clone --depth=1 https://github.com/duggum/zeza.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zeza
  1. Add zeza to the plugins array in your .zshrc file:
plugins=(... zeza)

Note: you have to install eza before using this plugin.

Commands

zeza provides the following commands

Command Description
help print a help message
configure generate a customizable configuration file
default setup eza to use the default, builtin color configuration
demo print color codes and descriptions in their assigned colors
nocolor setup eza to display completely colorless output
refresh refresh zeza to reflect changes made to a configuration
reset prepends the 'reset' flag to the EZA_COLORS environment variable
restore restore a previous custom configuration file
status show the current status of the zeza plugin environment
tables show formatted color tables using the terminal color scheme

For help with individual commands, run zeza <command> --help

Configure

As the name implies, this will be the primary command you use to configure eza.

There is no need to edit EZA_COLORS directly. The configure command will copy a thoroughly commented and fully customizable default configuration file called .zeza_custom.eza to a location of your choosing (default is $HOME). Simply edit the color assignments and run zeza refresh to apply your changes.

There is a handy cheatsheet available in the docs directory to help you if needed.

Tables

The tables command can be especially helpful as it displays a variety of color tables that demonstrate the rendering behavior of your terminal emulator.

For example:

zeza tables -nb displays a color table showing normal foreground colors on bright background colors

zeza tables demo

Another useful tool is zeza tables --test which will run a simple test to help you determine if your terminal emulator renders bold text as bold, bright, or both bold and bright. This can be useful as setting your emulator to only render bold text as bold allows for many more color combinations from among the base 16 color palette.

Feel free to jump down the rabbit hole if you wish to know more.

zeza tables test demo

Run zeza tables --help for detailed instructions.

Aliases

The aliases provided use the following default eza command options:

  • --git
  • --icons
  • --group
  • --group-directories-first
  • --sort=name

If you wish to set your own default command options, simply add the EZA_CMD_OPTS environment variable to your .zshenv or .zshrc file and export it:

export EZA_CMD_OPTS="<your options here>"

When you reload your shell, zeza will replace the internal default options with the ones you provided via EZA_CMD_OPTS. See: man eza for all available options.

Alias Preview

The following aliases are provided. They too can be overridden in your .zshenv or .zshrc file as desired.

# base implementation with default options
alias e='eza --git --icons --group --group-directories-first --sort=name' 

eza base demo

# mid form implementation (plus -l, -h, and --no-user options)
alias el='e -lh --no-user'

eza mid demo

# long form implementation (plus -l, -a, -g, and -h options)
alias ell='e -lagh'

eza long demo

# mid form tree listing
alias et='el --tree'

eza mid demo

# long form tree listing
alias elt='ell --tree'

eza long demo

LS Replacement

This plugin does not assume that you want to replace ls with eza. If you wish to do so you can simply create your own aliases in your .zshenv or .zshrc file.

For example:

alias ls='eza'
alias ll='eza -la'

Customization

You may add your own aliases in your .zshenv or .zshrc files as you see fit. Additionally, the default aliases listed above may be overriden by providing your own aliases with the same names.

Code Documentation

Documentation for the main code files can be found at:

Learn More

ANSI Color Sequence Cheatsheet

For eza see the following man pages:

For ANSI colors in terminal emulators:

About

A zsh plugin for managing and customizing eza, the very colorful ls replacement.

Resources

License

Stars

Watchers

Forks

Packages

No packages published