From 81fce1cfc1c9da7e46476f83294f7e4f6cf00c2a Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann Date: Fri, 23 Nov 2012 14:21:22 +0000 Subject: [PATCH] Provide option to list directory contents after changing directory --- modules/utility/init.zsh | 6 ++++++ runcoms/zpreztorc | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index ea31138c..5ebdd690 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -101,6 +101,12 @@ alias lc='lt -c' # Lists sorted by date, most recent last, shows change alias lu='lt -u' # Lists sorted by date, most recent last, shows access time. alias sl='ls' # I often screw this up. +# List directory after cd +if zstyle -t ':prezto:module:utility' ls-after-cd; then + function list-directory { ls } + chpwd_functions=($chpwd_functions list-directory) +fi + # Mac OS X Everywhere if [[ "$OSTYPE" == darwin* ]]; then alias o='open' diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 27aad49b..3166bdf0 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -44,6 +44,13 @@ zstyle ':prezto:module:editor' keymap 'emacs' # Auto convert .... to ../.. # zstyle ':prezto:module:editor' dot-expansion 'yes' +# +# Utility +# + +# List directory contents after changing directory +#zstyle ':prezto:module:utility' ls-after-cd 'yes' + # # Git #