From: Junio C Hamano Date: Thu, 18 Mar 2010 14:48:39 GMT Subject: Re: [PATCH] pull: replace unnecessary sed invocation Message-ID: <7vwrx9vg6w.fsf@alter.siamese.dyndns.org> In-Reply-To: <4BA22AEE.8000606@gmail.com> Gabriel Filion writes: >> +curr_branch_short="${curr_branch#refs/heads/}" > > This modification is a bashism. This syntax is not compatible with other > shells. To me, the above looks like "${parameter#word}", which is a plain vanilla POSIX shell construct that we adopted to use in our scripts. There are bash-only constructs we decided never to use in our scripts; among them are "${parameter/pattern/string}" and "${parameter:offset}", both are not in POSIX.