fix: cd doesn't resolve any '~'
fix: cd doesn't check for any tildes (which can be achieved by putting it in single quotes like '~/dir'). I added a check to the match statement to make sure that it always gets matched.
closes issue: #978
- '~' might not be the home variable on every system.
- '~' might only want to be checked on the first iteration of the function.
DirectoryStack.normalize_dir() now tries to match for '~' on every iteration which can add minimal slowdown to the function. It's already a branching function, so it has minimal impact.