Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor wrote: > __gitcomp_nl () > { > local IFS=$'\n' > - COMPREPLY=($(compgen -P "${2-}" -S "${4- }" -W "$1" -- "${3-$cur}")) > + COMPREPLY=($(awk -v pfx="${2-}" -v sfx="${4- }" -v cur="${3-$cur}" ' > + BEGIN { > +

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 8:28 PM, Felipe Contreras wrote: > On Sat, Nov 17, 2012 at 8:08 PM, Felipe Contreras > wrote: >> On Sat, Nov 17, 2012 at 3:14 PM, SZEDER Gábor wrote: >>> On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 8:08 PM, Felipe Contreras wrote: > On Sat, Nov 17, 2012 at 3:14 PM, SZEDER Gábor wrote: >> On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: >>> On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor wrote: >>> >>> > __gitcomp_nl () >>> > { >>> > local I

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 3:14 PM, SZEDER Gábor wrote: > On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: >> On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor wrote: >> >> > __gitcomp_nl () >> > { >> > local IFS=$'\n' >> > - COMPREPLY=($(compgen -P "${2-}" -S "${4- }"

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: > On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor wrote: > > > __gitcomp_nl () > > { > > local IFS=$'\n' > > - COMPREPLY=($(compgen -P "${2-}" -S "${4- }" -W "$1" -- "${3-$cur}")) > > + COMPREPLY=($(awk -v pfx=

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor wrote: > __gitcomp_nl () > { > local IFS=$'\n' > - COMPREPLY=($(compgen -P "${2-}" -S "${4- }" -W "$1" -- "${3-$cur}")) > + COMPREPLY=($(awk -v pfx="${2-}" -v sfx="${4- }" -v cur="${3-$cur}" ' > + BEGIN { > +

[PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread SZEDER Gábor
The compgen Bash-builtin performs expansion on all words in the wordlist given to its -W option, breaking Git's completion script when refs or filenames passed to __gitcomp_nl() contain expandable substrings. At least one user can't use ref completion at all in a repository, which contains tags wi