Re: [RFC/PATCH v4 5/6] completion: calculate argument position properly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 7, 2012, 18:59 UTC
- Message-ID
- <7v7gwn6cmv.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAMP44s3Bscm0T_=-g-wRc9kkZYZjGHGaP6hPi8598=Oh=skjxw@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 10 quoted lines
> On Mon, May 7, 2012 at 3:23 AM, Felipe Contreras > <felipe.contreras@gmail.com> wrote: > >> @@ -2642,6 +2642,8 @@ _git () >> return >> fi >> >> + (( cmd_pos = c + 1 )) > > Actually, I would prefer cmd_pos=$((c + 1)).
Yeah, that would feel more natural.
Together with 4/6, I am guessing that you are using $cmd and $cmd_pos as a global variable to pass state to/from helper functions. Are they properly documented in code (if not, please do so)?