From b38cb2d153ca667cc484c283ba389370d55e9056 Mon Sep 17 00:00:00 2001
From: Gardouille <gardouille@gmail.com>
Date: Mon, 11 Jul 2022 12:16:14 +0200
Subject: [PATCH] Update ls aliases for hidden files

---
 zshrc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/zshrc b/zshrc
index e0928e5..682a031 100644
--- a/zshrc
+++ b/zshrc
@@ -28,22 +28,27 @@ if [ ! $(command -v exa) ]; then
 	## with ls {{{
 	alias ll='ls -l'
 	## Show hidden files
-	alias la='ls -lA'
-	alias llh='ls -l | head'
-	alias llm='ls -l | $PAGER'
+	alias la='ll -A'
+	## Show hidden only
+	alias lla='la --directory .*'
+	alias l.='ls -d .*'
+	alias llh='ll -l | head'
+	alias llm='ll -l | $PAGER'
 	alias llw='ls | wc -l'
 	## Sort by date
 	alias lll='ls -l -t -h -r'
 	alias llll='ls -l -t -h -r'
 	alias lld='ls -l -d */ -h'
-	alias l.='ls -d .*'
 	alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/   /'\'' -e '\''s/-/|/'\'''
 	## }}}
 	## with exa {{{
 else
 	alias ll='exa --color=always --long --group --git'
 	## Show hidden files
-	alias la='ll --all'
+	alias la='ll --all --sort .name'
+	## Show hidden only
+	alias lla='ll --list-dirs .*'
+	alias l.='ls -d .*'
 	alias llh='ll | head'
 	alias llm='ll | less'
 	alias llw='ls | wc -l'
@@ -53,7 +58,6 @@ else
 	## Give a tree of current directory
 	alias llt='ll --tree'
 	alias lld='ll --group-directories-first'
-	alias l.='ls -d .*'
 	alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/   /'\'' -e '\''s/-/|/'\'''
 fi
 	## }}}