From: SZEDER Gábor Date: Tue, 17 Apr 2018 23:41:03 GMT Subject: Re: [PATCH 01/11] t9902-completion: add tests demonstrating issues with quoted pathnames Message-ID: In-Reply-To: On Wed, Apr 18, 2018 at 1:32 AM, SZEDER Gábor wrote: > On Tue, Apr 17, 2018 at 5:48 AM, Junio C Hamano wrote: >> SZEDER Gábor writes: >> >>> Do any more new tests need FUNNYNAMES* prereq? >> >> Hmph, all of these look like they involve some funnynames ;-) > > Well, I can' create a directory with a '|' in its name on FAT32 (on > Linux), so this needs FUNNYNAMES prereq, too. Or, on second thought, using a different, more widely usable character would be better, so the test can be run on more platforms. >> Do we want to test a more common case of a filename that is two >> words with SP in between, i.e. >> >> $ >'hello world' && git add hel >> >> or is it known to work just fine without quoting/escaping (because >> the funny we care about is output from ls-files and SP is not special >> in its one-item-at-a-time-on-a-line output) and not worth checking? > > This particular case already works, even without this patch series. > > The problems start when you want to complete the filename after a space, > e.g. 'hello\ w was the first thing I tried to write a test for, but it didn't work out: > inside the 'test_completion' helper function the space acts as > separator, and the completion script then sees 'hello\' and 'w' as two > separate words. On another second thought, a test for the already working 'hel' case could make sure that we won't mess up the value of IFS when filling COMPREPLY.