On Thu, 27 Jan 2022, 15:06 Martin Liška, <mli...@suse.cz> wrote:

> Hello.
>
> I've finished Martin's work and put the 2 aliases into files. The
> git-undescr.sh is basically
> unchanged, while I added better option parsing for git-descr.sh script so
> that it supports:
>
> $ git gcc-descr
> r12-6895-g14f339894db6ca
>
> $ git gcc-descr HEAD~10
> r12-6886-geaa59070343326
>
> $ git gcc-descr HEAD~10 --long
> r12-6886-geaa5907034332649c918f0579da805b6e786aa47
>
> $ git gcc-descr --short HEAD~10 --long
> r12-6886
>
> $ git gcc-descr --short --short --long HEAD~10
> r12-6886
>
> Ready to be installed?
>

> +    expr match ${r:-no} '^r[0-9]\+$' >/dev/null && r=${r}-0-g$(git
rev-parse $c);


Please remove the ^ from the 'expr' regex. The regex for an expr match can
only match at the beginning, so the ^ is implicit, but some implementations
ignore it (e.g. on Linux) and others march it as a normal character (e.g.
macOS).

Reply via email to