Fix incorrect behavior of cd ../.foo
#46
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cd builtin was removing
.
from directory names when combined with a preceding../
, which caused commands likecd ../.local
to becomecd ../local
. This patch fixes the problem by limiting the extra handling to leading..
. The bugfix comes from ksh93v- 2013-10-10-alpha, although this version is a shortened patch from Solaris (as ksh93v- refactored a decent amount of the code for thecd
builtin).Patch from Solaris:
https://github.com/oracle/solaris-userland/blob/860d27f/components/ksh93/patches/270-23319761.patch