I want to implement a function, when I enter a directory through cd, it will automatically scan whether the alias.sh file exists in the directory.
If the file exists, source it to load it. alias.sh is used to save alias configurations, but these alias configurations are only valid for one project, so it is required to automatically log out these alias configurations when exiting this directory.
Simply put, how to use zsh's directory entry hook and directory exit hook?
zsh
andbash
?