git-for-windows / git

A fork of Git containing Windows-specific patches.
http://gitforwindows.org/
Other
8.28k stars 2.51k forks source link

Cd tab completion with CDPATH #4860

Open Sayanel01 opened 6 months ago

Sayanel01 commented 6 months ago

Setup

$ git --version --build-options

git version 2.44.0.windows.1
cpu: x86_64
built from commit: ad0bbfffa543db6979717be96df630d3e5741331
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
$ cmd.exe /c ver

Microsoft Windows [version 10.0.19045.4123]
$ cat /etc/install-options.txt
Editor Option: Notepad++
Custom Editor Path: 
Default Branch Option:  
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled

I set my CDPATH environnement variable:

CDPATH=.:/c/some/path

Details

Bash

$ mkdir /c/some/path/myfolder
$ CDPATH=.:/c/some/path
$ cd myf<TAB>

When pressing TAB, I expect it to autocomplete to myfolder

No autocompletion.

Note: Lastest version of bash-completion (https://github.com/scop/bash-completion) do support completion with CDPATH

dscho commented 6 months ago

Note: Lastest version of bash-completion (https://github.com/scop/bash-completion) do support completion with CDPATH

Do feel free to integrate it into https://github.com/msys2/MSYS2-packages/tree/HEAD/bash-completion, and then we can see whether there is still anything we need to do to get it into Git for Windows.