-
Notifications
You must be signed in to change notification settings - Fork 405
Open
Description
Describe the bug
This bug seems to require a few things to occur:
- CDPATH must be set
- The parameter being completed must be the full name of a directory in the current directory
- No other directory is a valid completion
To reproduce
$ CDPATH=.
$ cd /
$ cd usr[TAB][TAB]
usr/ usr//
Expected behavior
Should have completed to cd bin/
Versions (please complete the following information)
- Operating system name/distribution and version: Fedora 43
- bash version,
echo "$BASH_VERSION": 5.3.0(1)-release - bash-completion version,
(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): git commit ed0ae10 and later
Additional context
This bug is in git but not in the distribution package. It appears to be a regression from commit ed0ae10 (the bug does not occur in its parent).
Commenting out this section appears to make the issue go away (although I don't understand what it is for):
if ((${#_cdpaths[@]} == 1)); then
_p=${_cdpaths[0]}
if [[ $_p == "$cur" && $_p != */ ]]; then
_cdpaths[0]=$_p/
fi
fi
Debug trace
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels