All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timo Hirvonen <tihirvon@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: freku045@student.liu.se, git@vger.kernel.org
Subject: Re: [PATCH 5/11] git-applypatch: Usage string clean-up, emit usage string at incorrect invocation
Date: Wed, 14 Dec 2005 14:45:42 +0200	[thread overview]
Message-ID: <20051214144542.0a509e3e.tihirvon@gmail.com> (raw)
In-Reply-To: <7vfyow45l2.fsf@assigned-by-dhcp.cox.net>

On Tue, 13 Dec 2005 21:20:57 -0800
Junio C Hamano <junkio@cox.net> wrote:

> freku045@student.liu.se writes:
> 
> >  . git-sh-setup
> >  
> > +[[ "$#" = "3" || "$#" = "4" ]] || usage
> > +
> 
> I do not see much advantage to use [[...]] construct here.

[[ ]] is bashishm. Does not work with ash.


test $# -ge 3 && test $# -le 4 || usage

You don't need to quote $# because it is always defined (and always
non-negative integer).  You can't unset or set it.

-- 
http://onion.dynserv.net/~timo/

  reply	other threads:[~2005-12-14 12:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 22:30 [PATCH 0/11] Usage string clean-up freku045
2005-12-13 22:30 ` [PATCH 2/11] git-verify-tag: Usage string clean-up, emit usage string at incorrect invocation freku045
2005-12-13 22:30 ` [PATCH 4/11] git-am: Usage string clean-up freku045
2005-12-13 22:30 ` [PATCH 7/11] git-fetch: Usage string clean-up, emit usage string at unrecognized option freku045
2005-12-13 22:30 ` [PATCH 8/11] git-lost-found: Usage string clean-up, emit usage string at incorrect invocation freku045
2005-12-13 22:30 ` [PATCH 6/11] git-cherry: Usage string clean-up, use the 'usage' function freku045
2005-12-13 22:30 ` [PATCH 5/11] git-applypatch: Usage string clean-up, emit usage string at incorrect invocation freku045
2005-12-14  5:20   ` Junio C Hamano
2005-12-14 12:45     ` Timo Hirvonen [this message]
2005-12-15 19:55       ` Fredrik Kuivinen
2005-12-15 20:30         ` Marco Costalba
2005-12-15 20:42           ` Junio C Hamano
2005-12-13 22:30 ` [PATCH 1/11] Trivial usage string clean-up freku045
2005-12-13 22:30 ` [PATCH 3/11] git-revert: Usage " freku045
2005-12-13 22:30 ` [PATCH 9/11] git-prune: Usage string clean-up, use the 'usage' function freku045
2005-12-13 22:30 ` [PATCH 10/11] git-rebase: Usage string clean-up, emit usage string at incorrect invocation freku045
2005-12-13 22:30 ` [PATCH 11/11] git-repack: Usage string clean-up, emit usage " freku045

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051214144542.0a509e3e.tihirvon@gmail.com \
    --to=tihirvon@gmail.com \
    --cc=freku045@student.liu.se \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.