Skip to content

Commit f26c86b

Browse files
authored
Merge pull request zshzoo#1 from manuelcattelan/main
feat: allow users to set command to execute
2 parents 94fdbd2 + 2c7b164 commit f26c86b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,8 @@ zstyle ':prezto:load' pmodule \
8181
[zcomet]: https://github.com/agkozak/zcomet
8282
[zgenom]: https://github.com/jandamm/zgenom
8383
[znap]: https://github.com/marlonrichert/zsh-snap
84+
85+
## Configuration
86+
87+
### `CD_LS_COMMAND`
88+
By setting the `CD_LS_COMMAND` environmental variable, you can customize the command to be executed right after `cd`. The command defaults to the standard `ls` in case the `CD_LS_COMMAND` variable is not set.

cd-ls.plugin.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ fi
55
function chpwd_cdls() {
66
if [[ -o interactive ]]; then
77
emulate -L zsh
8-
ls
8+
eval ${CD_LS_COMMAND:-ls}
99
fi
1010
}

0 commit comments

Comments
 (0)