From: Horst von Brand Date: Wed, 10 Aug 2005 02:20:23 GMT Subject: Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards Message-ID: <200508100220.j7A2KNWb005040@laptop11.inf.utfsm.cl> In-Reply-To: Junio C Hamano wrote: > Johannes Schindelin writes: > > >> True. My bad old habit. > > > > An elegant method to do that: > > > > case --some-long-option in "$1"*) ..; esac > > You are almost correct, but you need to realize that I generate > that long "case -s|--s|--so|--som|..." chain using a script that > takes all potential option names as its arguments, and makes > case arms that contain only unambiguous ones, so that I can > handle --some-long-option and --some-other-long-option sensibly. My head spins.... Isn't it easier to just use getopt(1)? > Also you forgot to grok --some-option-with-args=* in your > version ;-). Please stop! I'm dizzy already! -- Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513