From 57d0df7d52bda1ab183a71486659b8dfec40440c Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 28 Jul 2020 12:41:05 +0200 Subject: Added shortcut to open terminal in project repository --- .zshrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 284db68..edadd25 100644 --- a/.zshrc +++ b/.zshrc @@ -52,11 +52,12 @@ setopt auto_cd # cd without `cd` command setopt list_rows_first # cycle through row first in menu # setopt extendedglob -# executed when changind directory +# executed when changing directory function chpwd() { - content=`ls | wc -l` - ([ $content -lt 30 ] && tree -L 1) || + content=$(ls | wc -l) + ([ "$content" -lt 20 ] && ls -l) || echo "$(pwd) contains $content entries" + touch . # to sort by last cd } # add command-not-found package suggestion -- cgit