Skip to content

Commit 9ce8bbb

Browse files
authored
Add variable so it doesnt get loaded at shell startup
This is so it doesnt immediately ls if you have a cd in your .zshrc file add to end of .zshrc `CD_LS_INIT_COMPLETE=true zstyle ':hist:*' load-hooks false` This is a work around for zdharma-continuum/fast-syntax-highlighting#65 as they were conflicting Is there a better way to fix this?
1 parent f26c86b commit 9ce8bbb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cd-ls.plugin.zsh

+6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
zstyle ':cd-ls:*' cd_ls_init_complete= false
2+
13
# 'ls' after every 'cd'
24
if ! (( $chpwd_functions[(I)chpwd_cdls] )); then
35
chpwd_functions+=(chpwd_cdls)
46
fi
57
function chpwd_cdls() {
8+
if if zstyle -T ':hist:*' load-hooks; then
9+
return
10+
fi
611
if [[ -o interactive ]]; then
712
emulate -L zsh
813
eval ${CD_LS_COMMAND:-ls}
914
fi
1015
}
16+

0 commit comments

Comments
 (0)