From b19c5282b3c063ec9c27fe0a44a15466289c600d Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Mon, 28 Dec 2020 00:30:42 +0100 Subject: [PATCH] bash: make lt alias more regular (using either exa or tree) --- roles/dotfiles/files/bashrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/dotfiles/files/bashrc b/roles/dotfiles/files/bashrc index edf75f1..babe723 100644 --- a/roles/dotfiles/files/bashrc +++ b/roles/dotfiles/files/bashrc @@ -151,16 +151,21 @@ if command -v exa >/dev/null; then alias lt="ls -lT" alias lta="ls -lTa" alias lsc="ls --color=always" + alias ltc="lt --color=always" elif ls --group-directories-first --color=auto &>/dev/null 2>&1; then # GNU ls alias ls="ls -hF --group-directories-first --color=auto" alias la="ls -A" + alias lt="tree --dirsfirst -FI '.git|Spotlight-V100|.fseventsd'" alias lsc="ls --color=always" + alias ltc="tree -C --dirsfirst -FI '.git'" else # BSD ls (e.g. macOS) alias ls="ls -hF -G" alias la="ls -A" + alias lt="tree --dirsfirst -FI '.git|Spotlight-V100|.fseventsd'" alias lsc="/usr/bin/env CLICOLOR_FORCE=1 ls" + alias ltc="tree -C --dirsfirst -FI '.git'" fi alias ll="ls -l" @@ -200,10 +205,6 @@ alias light='change_bg light' # Add shell functions ############################################################################## -tree() { command tree --dirsfirst -FI '.git|Spotlight-V100|.fseventsd' "$@"; } - -ltree() { tree -C "$@" | less -R; } - mkcd() { mkdir -p -- "$1" && cd -P -- "$1" || return; } change_bg() { BACKGROUND="$1"; command -v solarize >/dev/null && solarize; }