diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-07-28 12:41:05 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-07-28 12:41:05 +0200 |
| commit | 57d0df7d52bda1ab183a71486659b8dfec40440c (patch) | |
| tree | 95c42eb91315f17a1681785b2df1ad04e9d590d0 /.zshrc | |
| parent | 899b8d4951cfe8f486ee9bc1790519505ad6a0c9 (diff) | |
| download | dotfiles-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-- | .zshrc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |
