Created
June 4, 2020 21:00
-
-
Save connoro7/52f3e0d7bd85e5038d1c59973417dc8e to your computer and use it in GitHub Desktop.
Exa alias options + documentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Author: Connor Dillon | |
# Created: June 4 2020 | |
# Some useful `exa` aliases meant to replace standard `ls` usage. | |
# The aliases use `l` instead of `exa` to make use of muscle memory from typing `ls` all the time :) | |
# Use `$ exahelp` to print documentation to console | |
# | |
# Download `exa` via: | |
# OSX: $ brew install exa | |
# Linux: $ sudo apt-get install exa | |
# | |
# Uses aliased PS1 settings, listed here for your convenience: | |
# Color_Off=$'\033[0m' # Text | |
# Red=$'\033[0;31m' # Red text | |
# Green=$'\033[0;32m' # Green text | |
# Blue=$'\033[0;34m' # Blue text | |
# BIGreen=$'\033[1;92m' # Green Bold Intense text | |
# Info=$'\033[0;44;97m' # Blue background | |
## | |
export EXA_OPTIONS="-F --group-directories-first --color=always" # classify files and groups folders together for human readability | |
alias l="exa $EXA_OPTIONS" # porting ls to exa | |
alias lg="exa -G $EXA_OPTIONS" # list as grid | |
alias lga="exa -Ga $EXA_OPTIONS" # list as grid + dotfiles | |
alias ll="exa -lh $EXA_OPTIONS" # list permissions | |
alias lla="exa -lha $EXA_OPTIONS" # list permissions + dotfiles | |
function lt () { exa -lh $EXA_OPTIONS --tree --level="${1:-1}" ; } | |
# | |
alias exahelp=' | |
echo -e "$Info Exa Options: $Color_Off" && | |
echo -e "l ...... exa default" && | |
echo -e "lg ..... $Blue grid $Color_Off" && | |
echo -e "lga .... $Blue grid $Red all $Color_Off" && | |
echo -e "ll ..... $Green list $Color_Off" && | |
echo -e "lla .... $Green list $Red all $Color_Off" && | |
echo -e "lt ..... $BIGreen tree $Color_Off, must specify depth, default = 1" | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment