{"thread":{"id":"61092","subject":"Git bug report CDPATH completion","startedAt":"2024-03-11T14:24:31Z","lastAt":"2024-03-11T21:36:04Z","messageCount":3,"participants":["Philemon GIRAUD","Junio C Hamano","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"490358","messageId":"AM6PR10MB28087CFD43779194563F558492242@AM6PR10MB2808.EURPRD10.PROD.OUTLOOK.COM","threadId":"61092","inReplyTo":null,"subject":"Git bug report CDPATH completion","fromName":"Philemon GIRAUD","fromEmail":"philemon.giraud@metrologic.group","sentAt":"2024-03-11T14:24:24Z","receivedAt":"2024-03-11T14:24:31Z","isPatch":false,"sender":{"key":"philemon.giraud@metrologic.group","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\nThis bug is about the \"git bash\" that comes with git for windows\nI added \"export CDPATH=.:/c/some/path\" to my .bashrc\n\nWhat did you expect to happen? (Expected behavior)\nGiven that the folder \"/c/some/path/myfolder\" exists,\nI expected to type (from any directory) \"cd myf<TAB>\" add that the autocomplete would complete to \"cd myfolder\"\n\nWhat happened instead? (Actual behavior)\nThe tab completion did not work, nothing happened when pressing tab.\n\nWhat's different between what you expected and what actually happened?\nTab completion after cd do work with normal path, but not for addtional path accessible thanks to CDPATH\n\nAnything else you want to add:\nNote that the CDPATH variable do work: \"cd myfolder\" takes me to \"/c/some/path/myfolder\" all the time, whatever the starting directory is\nLastest bash-completion (https://github.com/scop/bash-completion) do support completion with CDPATH (see https://github.com/scop/bash-completion/blob/master/completions/cd)\n\n[System Info]\ngit version:\ngit version 2.44.0.windows.1\ncpu: x86_64\nbuilt from commit: ad0bbfffa543db6979717be96df630d3e5741331\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Windows 10.0 19045 \ncompiler info: gnuc: 13.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to showPhilémon Giraud  | CS engineer \n\n"},{"id":"490377","messageId":"xmqq8r2or604.fsf@gitster.g","threadId":"61092","inReplyTo":"AM6PR10MB28087CFD43779194563F558492242@AM6PR10MB2808.EURPRD10.PROD.OUTLOOK.COM","subject":"Re: Git bug report CDPATH completion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-11T18:13:47Z","receivedAt":"2024-03-11T18:13:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philemon GIRAUD <philemon.giraud@metrologic.group> writes:\n\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> This bug is about the \"git bash\" that comes with git for windows\n> I added \"export CDPATH=.:/c/some/path\" to my .bashrc\n\nFYI, https://news.ycombinator.com/item?id=19886334 is the first hit\nwhen I asked \"exporting CDPATH\" to my search engine.  It makes an\ninteresting and educational read.  In short, setting CDPATH in your\ninteractive environment, i.e.  your .bashrc having CDPATH=..., is a\nfine convenience measure, exporting it to environment is not.\n\nIn addition to what people wrote there, it would break many\nthird-party shell scripts that expect their \"cd\" to work without\ngetting affected.  We even explicitly unset CDPATH in our\n(remaining) shell scripted Porcelain commands to avoid the insanity\nof it the first thing.\n"},{"id":"490400","messageId":"Ze95PCbwn9IE99Kb@tapette.crustytoothpaste.net","threadId":"61092","inReplyTo":"AM6PR10MB28087CFD43779194563F558492242@AM6PR10MB2808.EURPRD10.PROD.OUTLOOK.COM","subject":"Re: Git bug report CDPATH completion","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-03-11T21:35:56Z","receivedAt":"2024-03-11T21:36:04Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-03-11 at 14:24:24, Philemon GIRAUD wrote:\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n\nHey,\n\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> This bug is about the \"git bash\" that comes with git for windows\n> I added \"export CDPATH=.:/c/some/path\" to my .bashrc\n> \n> What did you expect to happen? (Expected behavior)\n> Given that the folder \"/c/some/path/myfolder\" exists,\n> I expected to type (from any directory) \"cd myf<TAB>\" add that the autocomplete would complete to \"cd myfolder\"\n\nThis mailing list is for the Git project, which deals only with source\ndistributions of Git and doesn't distribute any associated software\n(outside of contrib), such as bash.  You're reporting a problem with Git\nfor Windows, which should be reported to\nhttps://github.com/git-for-windows/git/issues/.  Do be sure to search\nfirst in case this has already been reported.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"}]}