Re: [PATCH 12/10] support pager.* for external commands
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 12, 2012, 00:46 UTC
- Message-ID
- <CACBZZX596wnk2KE9QzUPMc=A6Mt8HbUs7F4rnAZbw1_RrcKHnw@mail.gmail.com>
- In-Reply-To
- <20110818220132.GB7799@sigill.intra.peff.net>
On Fri, Aug 19, 2011 at 00:01, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
> +test_expect_success TTY 'command-specific pager works for external commands' ' > + sane_unset PAGER GIT_PAGER && > + echo "foo:initial" >expect && > + >actual && > + test_config pager.external "sed s/^/foo:/ >actual" && > + test_terminal git --exec-path="`pwd`" external log --format=%s -1 && > + test_cmp expect actual
For reasons that I haven't looked into using sed like that breaks under /usr/bin/ksh on Solaris. Just using:
sed -e \"s/^/foo:/\"
Instead fixes it, it's not broken with /usr/xpg4/bin/sh, so it's some ksh peculiarity.
The error it gives is:
sed s/^/foo:/ >actual: Not found
Indicating that for some reason it's considering that whole "sed s/^/foo:/ >actual" string to be a single command.