When changing the current directory, set NEXTDIR, and PREVDIR environment values through shell hook function.
When changing the current directory, set NEXTDIR, and PREVDIR environment values through shell hook function.