From: Felipe Contreras Date: Wed, 17 Oct 2012 18:21:21 GMT Subject: Re: [PATCH] completion: clean up __gitcomp() tests Message-ID: In-Reply-To: <20121017175428.GF2156@goldbirke> On Wed, Oct 17, 2012 at 7:54 PM, SZEDER Gábor wrote: > Clean up two issues in the tests I added in 74a8c849 (tests: add tests > for the __gitcomp() completion helper function, 2012-04-17): > > - The COMPREPLY array is created using 'local -a' while in a > subshell. However, the local keyword should only be used in a > shell function, and a variable created in a subshell is by > definition local to that subshell. Use 'declare -a' instead. > > - The contents of the COMPREPLY array is written through an IFS > fiddling + echo + redirection combo, although there is the > print_comp() helper function for exactly this purpose. Makes sense. But this code seems awfully similar, a helper function might help. -- Felipe Contreras