Replace exa with eza

`exa` is unmaintained, `eza` is a maintained fork.
This commit is contained in:
Fernando Schauenburg 2024-03-08 22:41:04 +01:00
parent 82db341e82
commit 2be6fb83f5
2 changed files with 22 additions and 3 deletions

View file

@ -1,9 +1,9 @@
# ls: make `ls` group directories first if supported. # ls: make `ls` group directories first if supported.
# lsc: force `ls` to use color output (e.g. for piping into `less`). # lsc: force `ls` to use color output (e.g. for piping into `less`).
if command -v exa >/dev/null 2>&1; then if command -v eza >/dev/null 2>&1; then
# Prefer exa if installed # Prefer eza if installed
alias \ alias \
ls="exa --classify --group-directories-first --group --links" \ ls="eza --classify --group-directories-first --group --links" \
la="ls --all" \ la="ls --all" \
lt="ls --long --tree --ignore-glob='.git'" \ lt="ls --long --tree --ignore-glob='.git'" \
lta="lt --all" \ lta="lt --all" \

View file

@ -7,6 +7,7 @@ DOTFILES_URL="https://github.com/fschauen/dotfiles.git"
NEOVIM_VERSION="0.9.1" NEOVIM_VERSION="0.9.1"
GIT_DELTA_VERSION="0.16.5" GIT_DELTA_VERSION="0.16.5"
LF_VERSION="r30" LF_VERSION="r30"
EZA_VERSION="0.18.5"
STOW_DIR="/usr/local/stow" STOW_DIR="/usr/local/stow"
@ -180,6 +181,21 @@ install_lf() {
fi fi
} }
install_eza() {
eza_url="http://deb.gierens.de/pool/main/e/eza/eza_${EZA_VERSION}_amd64.deb"
eza_deb="eza_${EZA_VERSION}_amd64.deb"
eza_bin="/usr/bin/eza"
if [ -f "${eza_bin}" ]; then
skipped "${eza_bin} exists"
elif ! download "${eza_url}" "${eza_deb}"; then
skipped "${eza_deb} not available and failed to download ${eza_url}"
else
$cmd dpkg -i "${eza_deb}"
$cmd rm -vf "${eza_deb}"
fi
}
user_setup() { user_setup() {
if user_exists "$1"; then if user_exists "$1"; then
echo "User $1 exists. Updating..." echo "User $1 exists. Updating..."
@ -259,6 +275,9 @@ execute() {
heading "Install lf v$LF_VERSION" heading "Install lf v$LF_VERSION"
install_lf install_lf
heading "Install exa v$EZA_VERSION"
install_eza
heading "Setup user: $USERNAME" heading "Setup user: $USERNAME"
user_setup "$USERNAME" user_setup "$USERNAME"