From: Felipe Contreras <felipe.contreras@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Subject: Re: [PATCH] completion: clean up __gitcomp() tests
Date: Wed, 17 Oct 2012 20:21:21 +0200 [thread overview]
Message-ID: <CAMP44s2Daj-yvTqKc-fMiqvA64z_odZy_dhGvtB7rM--LbuQRQ@mail.gmail.com> (raw)
In-Reply-To: <20121017175428.GF2156@goldbirke>
On Wed, Oct 17, 2012 at 7:54 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:
> Clean up two issues in the tests I added in 74a8c849 (tests: add tests
> for the __gitcomp() completion helper function, 2012-04-17):
>
> - The COMPREPLY array is created using 'local -a' while in a
> subshell. However, the local keyword should only be used in a
> shell function, and a variable created in a subshell is by
> definition local to that subshell. Use 'declare -a' instead.
>
> - The contents of the COMPREPLY array is written through an IFS
> fiddling + echo + redirection combo, although there is the
> print_comp() helper function for exactly this purpose.
Makes sense. But this code seems awfully similar, a helper function might help.
--
Felipe Contreras
next prev parent reply other threads:[~2012-10-17 18:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-14 15:52 [PATCH v5 0/3] completion: refactor and zsh wrapper Felipe Contreras
2012-10-14 15:52 ` [PATCH v5 1/3] completion: add new __gitcompadd helper Felipe Contreras
2012-10-17 17:28 ` SZEDER Gábor
2012-10-22 0:41 ` Felipe Contreras
2012-10-30 23:18 ` SZEDER Gábor
2012-10-14 15:52 ` [PATCH v5 2/3] tests: use __gitcompadd to simplify completion tests Felipe Contreras
2012-10-16 0:24 ` Felipe Contreras
2012-10-17 17:50 ` SZEDER Gábor
2012-10-17 17:54 ` [PATCH] completion: clean up __gitcomp() tests SZEDER Gábor
2012-10-17 18:21 ` Felipe Contreras [this message]
2012-10-17 18:26 ` [PATCH v5 2/3] tests: use __gitcompadd to simplify completion tests Felipe Contreras
2012-10-14 15:52 ` [PATCH v5 3/3] completion: add new zsh completion Felipe Contreras
2012-10-15 6:38 ` Felipe Contreras
2012-10-15 16:45 ` [PATCH v5 0/3] completion: refactor and zsh wrapper Matthieu Moy
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMP44s2Daj-yvTqKc-fMiqvA64z_odZy_dhGvtB7rM--LbuQRQ@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=matthieu.moy@grenoble-inp.fr \
--cc=szeder@ira.uka.de \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).