From 2888bf66f440e30d02965ad147bdd72492432b17 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 20 Mar 2023 16:30:09 +0000 Subject: [PATCH] Fixes file listing aliases in general --- config/zsh/aliases/general.zsh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/config/zsh/aliases/general.zsh b/config/zsh/aliases/general.zsh index af2f7ed..09fddc5 100644 --- a/config/zsh/aliases/general.zsh +++ b/config/zsh/aliases/general.zsh @@ -25,10 +25,6 @@ if alias_not_used t; then; alias t='touch'; fi if alias_not_used v; then; alias v='vim'; fi # File listing options -alias la='ls -A' # List all files/ includes hidden -alias ll='ls -lAFh' # List all files, with full details -alias lm='ls -tA -1' # List files sorted by last modified -alias lb='ls -lhSA' # List all files sorted by biggest alias lr='ls -R' # List files in sub-directories, recursivley alias lf='ls -A | grep' # Use grep to find files alias lc='find . -type f | wc -l' # Shows number of files @@ -36,12 +32,17 @@ alias ld='ls -l | grep "^d"' # List directories only # If exa installed, then use exa for some ls commands if command_exists exa ; then - alias l='exa -aF --icons' # Quick ls - alias la='exa -aF --icons' # List all - alias ll='exa -laF --icons' # Show details - alias lm='exa -lahr --color-scale --icons -s=modified' # Recent - alias lb='exa -lahr --color-scale --icons -s=size' # Largest / size - alias tree='f() { exa -aF --tree -L=${1:-2} --icons };f' + alias l='exa -aF --icons' # Quick ls + alias la='exa -aF --icons' # List all + alias ll='exa -laF --icons' # Show details + alias lm='exa -lahr --color-scale --icons -s=modified' # Recent + alias lb='exa -lahr --color-scale --icons -s=size' # Largest / size + alias tree='f() { exa -aF --tree -L=${1:-2} --icons };f' +else + alias la='ls -A' # List all files/ includes hidden + alias ll='ls -lAFh' # List all files, with full details + alias lb='ls -lhSA' # List all files sorted by biggest + alias lm='ls -tA -1' # List files sorted by last modified fi # List contents of packed file, depending on type