aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-07-28 12:41:05 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-07-28 12:41:05 +0200
commit57d0df7d52bda1ab183a71486659b8dfec40440c (patch)
tree95c42eb91315f17a1681785b2df1ad04e9d590d0 /.zshrc
parent899b8d4951cfe8f486ee9bc1790519505ad6a0c9 (diff)
downloaddotfiles-57d0df7d52bda1ab183a71486659b8dfec40440c.tar.gz
dotfiles-57d0df7d52bda1ab183a71486659b8dfec40440c.tar.bz2
dotfiles-57d0df7d52bda1ab183a71486659b8dfec40440c.zip
Added shortcut to open terminal in project repository
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