From a514868fbc78599106fdbd8ad08f91a1226a7505 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 29 Mar 2022 18:00:16 +0200 Subject: [PATCH] Add ls + wc -l alias --- zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zshrc b/zshrc index d5dd1fd..18034eb 100644 --- a/zshrc +++ b/zshrc @@ -25,23 +25,28 @@ alias rm='rm --interactive' # ls shortcut {{{ 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 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 llh='ll | head' alias llm='ll | less' + alias llw='ls | wc -l' ## Sort by date alias lll='ll --sort=modified' alias llll='ll --sort=modified' @@ -51,6 +56,7 @@ else alias l.='ls -d .*' alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\''' fi + ## }}} # }}} # cat with number on output lines