Conditionally add the eza
command to list contents on cd
We dont want to blindly add it multiple times, that just causes the contents of a directory to get listed multiple times when `cd`ing.
This commit is contained in:
parent
6c532440e3
commit
3bd7aac84f
1 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,10 @@ ezacd () {
|
||||||
|
|
||||||
eza --oneline --long --classify --icons --header
|
eza --oneline --long --classify --icons --header
|
||||||
}
|
}
|
||||||
chpwd_functions=(${chpwd_functions[@]} "ezacd")
|
# Only add ezacd to chpwd_functions if it's not already there
|
||||||
|
if (( ${chpwd_functions[(I)ezacd]} == 0 )); then
|
||||||
|
chpwd_functions=(${chpwd_functions[@]} "ezacd")
|
||||||
|
fi
|
||||||
|
|
||||||
# Go Lang stuff
|
# Go Lang stuff
|
||||||
export GOPATH=$HOME/go
|
export GOPATH=$HOME/go
|
||||||
|
|
Loading…
Add table
Reference in a new issue