From: "Jay Soffian" <jaysoffian@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Jeff King" <peff@peff.net>,
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 3/3] help: respect aliases
Date: Tue, 26 Feb 2008 15:31:11 -0500 [thread overview]
Message-ID: <76718490802261231j61e66f91r473401e42816cceb@mail.gmail.com> (raw)
In-Reply-To: <7vve4b4gqu.fsf@gitster.siamese.dyndns.org>
On Tue, Feb 26, 2008 at 3:14 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Sure. The combination of expand, sed, and gnused hurts my eyes
> ;-)
>
> One good lesson to take home is that by ending your lines with
> '|', you can tell the shell that you are not done with the
> pipeline you are forming yet.
The backslashes aren't there for the shell, they are there for the git
config parser. Anyway, I reworked it a bit:
alias = "! sh -c 'case $# in \
0) git config --get-regexp \"^alias\\.\" \
| sort | sed \"s/^alias\\.//; s/=/ /\" \
| while read n v; do \
printf \"%-16s\" \"$n\"; \
echo \"$v\" | fmt -sw 63 | sed \"2,$ s/^/\t\t/\" ;\
done ;; \
1) git config \"alias.$1\" | fmt -sw 78 ;; esac' -"
And yes, it's still ugly.
Always happy to have folks help me bikeshed my git config. :-)
j.
prev parent reply other threads:[~2008-02-26 20:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1203890846.git.peff@peff.net>
2008-02-24 22:16 ` [PATCH 1/3] help: use parseopt Jeff King
2008-02-25 6:50 ` Christian Couder
2008-02-25 6:57 ` Jeff King
2008-02-25 7:16 ` Junio C Hamano
2008-02-24 22:17 ` [PATCH 2/3] make alias lookup a public, procedural function Jeff King
2008-02-24 22:17 ` [PATCH 3/3] help: respect aliases Jeff King
2008-02-25 2:10 ` Jay Soffian
2008-02-26 12:43 ` Johannes Schindelin
2008-02-26 14:56 ` Jay Soffian
2008-02-26 15:15 ` Johannes Schindelin
2008-02-26 20:14 ` Junio C Hamano
2008-02-26 20:31 ` Jay Soffian [this message]
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=76718490802261231j61e66f91r473401e42816cceb@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.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 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).