git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git bug report CDPATH completion
@ 2024-03-11 14:24 Philemon GIRAUD
  2024-03-11 18:13 ` Junio C Hamano
  2024-03-11 21:35 ` brian m. carlson
  0 siblings, 2 replies; 3+ messages in thread
From: Philemon GIRAUD @ 2024-03-11 14:24 UTC (permalink / raw
  To: git@vger.kernel.org

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
This bug is about the "git bash" that comes with git for windows
I added "export CDPATH=.:/c/some/path" to my .bashrc

What did you expect to happen? (Expected behavior)
Given that the folder "/c/some/path/myfolder" exists,
I expected to type (from any directory) "cd myf<TAB>" add that the autocomplete would complete to "cd myfolder"

What happened instead? (Actual behavior)
The tab completion did not work, nothing happened when pressing tab.

What's different between what you expected and what actually happened?
Tab completion after cd do work with normal path, but not for addtional path accessible thanks to CDPATH

Anything else you want to add:
Note that the CDPATH variable do work: "cd myfolder" takes me to "/c/some/path/myfolder" all the time, whatever the starting directory is
Lastest bash-completion (https://github.com/scop/bash-completion) do support completion with CDPATH (see https://github.com/scop/bash-completion/blob/master/completions/cd)

[System Info]
git version:
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
uname: Windows 10.0 19045 
compiler info: gnuc: 13.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]
not run from a git repository - no hooks to showPhilémon Giraud  | CS engineer 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git bug report CDPATH completion
  2024-03-11 14:24 Git bug report CDPATH completion Philemon GIRAUD
@ 2024-03-11 18:13 ` Junio C Hamano
  2024-03-11 21:35 ` brian m. carlson
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2024-03-11 18:13 UTC (permalink / raw
  To: Philemon GIRAUD; +Cc: git@vger.kernel.org

Philemon GIRAUD <philemon.giraud@metrologic.group> writes:

> What did you do before the bug happened? (Steps to reproduce your issue)
> This bug is about the "git bash" that comes with git for windows
> I added "export CDPATH=.:/c/some/path" to my .bashrc

FYI, https://news.ycombinator.com/item?id=19886334 is the first hit
when I asked "exporting CDPATH" to my search engine.  It makes an
interesting and educational read.  In short, setting CDPATH in your
interactive environment, i.e.  your .bashrc having CDPATH=..., is a
fine convenience measure, exporting it to environment is not.

In addition to what people wrote there, it would break many
third-party shell scripts that expect their "cd" to work without
getting affected.  We even explicitly unset CDPATH in our
(remaining) shell scripted Porcelain commands to avoid the insanity
of it the first thing.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git bug report CDPATH completion
  2024-03-11 14:24 Git bug report CDPATH completion Philemon GIRAUD
  2024-03-11 18:13 ` Junio C Hamano
@ 2024-03-11 21:35 ` brian m. carlson
  1 sibling, 0 replies; 3+ messages in thread
From: brian m. carlson @ 2024-03-11 21:35 UTC (permalink / raw
  To: Philemon GIRAUD; +Cc: git@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

On 2024-03-11 at 14:24:24, Philemon GIRAUD wrote:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.

Hey,

> What did you do before the bug happened? (Steps to reproduce your issue)
> This bug is about the "git bash" that comes with git for windows
> I added "export CDPATH=.:/c/some/path" to my .bashrc
> 
> What did you expect to happen? (Expected behavior)
> Given that the folder "/c/some/path/myfolder" exists,
> I expected to type (from any directory) "cd myf<TAB>" add that the autocomplete would complete to "cd myfolder"

This mailing list is for the Git project, which deals only with source
distributions of Git and doesn't distribute any associated software
(outside of contrib), such as bash.  You're reporting a problem with Git
for Windows, which should be reported to
https://github.com/git-for-windows/git/issues/.  Do be sure to search
first in case this has already been reported.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-11 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 14:24 Git bug report CDPATH completion Philemon GIRAUD
2024-03-11 18:13 ` Junio C Hamano
2024-03-11 21:35 ` brian m. carlson

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).