From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] bash: offer only paths after '--' Date: Tue, 08 Jul 2008 13:21:35 -0700 Message-ID: <7vtzf0rusw.fsf@gitster.siamese.dyndns.org> References: <279b37b20807071341k3551e61cl10c5969600ba8218@mail.gmail.com> <20080708044922.GD2542@spearce.org> <7vprppvt7a.fsf@gitster.siamese.dyndns.org> <20080708165614.GB8224@neumann> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Johannes Schindelin , "Shawn O. Pearce" , Eric Raible , Git Mailing List To: SZEDER =?utf-8?Q?G=C3=A1bor?= X-From: git-owner@vger.kernel.org Tue Jul 08 22:22:53 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KGJi3-0008E0-H3 for gcvg-git-2@gmane.org; Tue, 08 Jul 2008 22:22:47 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754035AbYGHUVu convert rfc822-to-quoted-printable (ORCPT ); Tue, 8 Jul 2008 16:21:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753936AbYGHUVu (ORCPT ); Tue, 8 Jul 2008 16:21:50 -0400 Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:63196 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753475AbYGHUVt convert rfc822-to-8bit (ORCPT ); Tue, 8 Jul 2008 16:21:49 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 4A27414C48; Tue, 8 Jul 2008 16:21:47 -0400 (EDT) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 775E314C46; Tue, 8 Jul 2008 16:21:38 -0400 (EDT) In-Reply-To: <20080708165614.GB8224@neumann> (SZEDER =?utf-8?Q?G=C3=A1bor'?= =?utf-8?Q?s?= message of "Tue, 8 Jul 2008 18:56:14 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 7D592FC0-4D2B-11DD-A943-CE28B26B55AE-77302942!a-sasl-fastnet.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: SZEDER G=C3=A1bor writes: > Hope that I got the commit message right (; It was very readable. Thanks. > +__git_has_doubledash () > +{ > + local c=3D1 > + while [ $c -lt $COMP_CWORD ]; do > + if [ "--" =3D "${COMP_WORDS[c]}" ]; then > + return 0 > + fi > + c=3D$((++c)) This assignment is somewhat curious, although it should work as expecte= d either way ;-) Shawn?