From: Paul Smith <paul@mad-scientist.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
Manlio Perillo <manlio.perillo@gmail.com>,
git@vger.kernel.org
Subject: Re: [RFC/PATCH] git-completion.bash: remove bashism to fix ZSH compatibility
Date: Mon, 11 Mar 2013 14:19:44 -0400 [thread overview]
Message-ID: <1363025984.24833.19.camel@pdsdesk> (raw)
In-Reply-To: <7vwqtd95bm.fsf@alter.siamese.dyndns.org>
On Mon, 2013-03-11 at 11:09 -0700, Junio C Hamano wrote:
> So strictly speaking there is no reason for an extra subshell here,
> but writing this in the way the patch does makes our intention
> crystal clear, I think.
If you're concerned about the extra processing of the new shell you can
use {} instead of ():
{
test -n "${CDPATH+set}" && unset CDPATH
# NOTE: $2 is not quoted in order to support multiple options
cd "$1" && git ls-files --exclude-standard $2
} 2>/dev/null
Zsh does support this properly in my testing. It's only redirection of
an entire function body, as the original, that is working differently in
zsh and bash.
next prev parent reply other threads:[~2013-03-11 18:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 12:21 [RFC/PATCH] git-completion.bash: remove bashism to fix ZSH compatibility Matthieu Moy
2013-03-11 16:17 ` Junio C Hamano
2013-03-11 16:41 ` Junio C Hamano
2013-03-11 16:47 ` Matthieu Moy
2013-03-11 17:01 ` Junio C Hamano
2013-03-11 17:12 ` Manlio Perillo
2013-03-11 17:09 ` Manlio Perillo
2013-03-11 17:23 ` Junio C Hamano
2013-03-11 17:48 ` Matthieu Moy
2013-03-11 18:09 ` Junio C Hamano
2013-03-11 18:19 ` Paul Smith [this message]
2013-03-11 19:09 ` Manlio Perillo
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=1363025984.24833.19.camel@pdsdesk \
--to=paul@mad-scientist.net \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=manlio.perillo@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).