Re: [PATCH 1/2] sparse-checkout: custom tab completion tests
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Dec 30, 2021, 17:43 UTC
- Message-ID
- <63bb7366-71f6-d4c3-529f-c52d3610c1cd@gmail.com>
- In-Reply-To
- <e6728ed1-52c6-05eb-e816-a9d919d3e9d1@gmail.com>
On 12/30/2021 11:19 AM, Lessley Dennington wrote:
> On 12/30/21 7:43 AM, Derrick Stolee wrote:
Show 30 quoted lines
>>> + ( >>> + cd sparse-checkout && >>> + test_completion "git sparse-checkout set f" <<-\EOF >>> + folder1 Z >>> + folder1/0 Z >>> + folder1/0/1 Z >>> + folder2 Z >>> + folder2/0 Z >>> + folder3 Z >> >> This tab-completion doing a full directory walk seems like it could >> be expensive for a large repository, but I suppose it is the only way >> to allow the following sequence: >> >> fol<tab> -> folder >> folder1/<tab> -> folder1/0 >> folder1/0/<tab> -> folder1/0/1 >> >> (Hopefully that makes sense.) >> > Yes, it does. >> It would be more efficient to only go one level deep at a time, but >> that might not be possible with the tab completion mechanisms. >> > When you say one level deep, do you mean that from the sparse-checkout > directory, tab completion would only show the following? > > folder1 > folder2 > folder3
That's what I mean by one level deep at a time, but I also am not sure that that is the correct functionality. I would leave the full expansion as you have now as the design.
Thanks, -Stolee