aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc7
1 files changed, 4 insertions, 3 deletions
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