git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C HamanoNext: Jeff King
Message 30 of 37 in “color and pager improvements”
  1. 0/10 color and pager improvementsJeff King, Aug 18, 2011
  2. 01/10 t7006: modernize calls to unsetJeff King, Aug 18, 2011
  3. Junio C HamanoAug 18, 2011
  4. 02/10 test-lib: add helper functions for configJeff King, Aug 18, 2011
  5. Junio C HamanoAug 18, 2011
  6. 03/10 t7006: use test_config helpersJeff King, Aug 18, 2011
  7. 04/10 setup_pager: set GIT_PAGER_IN_USEJeff King, Aug 18, 2011
  8. 05/10 diff: refactor COLOR_DIFF from a flag into an intJeff King, Aug 18, 2011
  9. 06/10 git_config_colorbool: refactor stdout_is_tty handlingJeff King, Aug 18, 2011
  10. 07/10 color: delay auto-color decision until point of useJeff King, Aug 18, 2011
  11. Junio C HamanoAug 18, 2011
  12. Jeff KingAug 18, 2011
  13. 08/10 config: refactor get_colorbool functionJeff King, Aug 18, 2011
  14. 09/10 diff: don't load color config in plumbingJeff King, Aug 18, 2011
  15. 10/10 want_color: automatically fallback to color.uiJeff King, Aug 18, 2011
  16. Martin von ZweigbergkSep 4, 2011
  17. Jeff KingSep 4, 2011
  18. Steffen Daode NurpmesoSep 5, 2011
  19. Jeff KingAug 18, 2011
  20. 11/10 support pager.* for aliasesJeff King, Aug 18, 2011
  21. Junio C HamanoAug 18, 2011
  22. Jeff KingAug 19, 2011
  23. Junio C HamanoAug 19, 2011
  24. Jeff KingAug 19, 2011
  25. Junio C HamanoAug 19, 2011
  26. Junio C HamanoAug 19, 2011
  27. Jeff KingAug 19, 2011
  28. 12/10 support pager.* for external commandsJeff King, Aug 18, 2011
  29. Junio C HamanoAug 18, 2011
  30. Ævar Arnfjörð BjarmasonFeb 12, 2012
  31. Jeff KingFeb 14, 2012
  32. Ingo BrücklAug 18, 2011
  33. Jeff KingAug 18, 2011
  34. Ingo BrücklAug 19, 2011
  35. Jeff KingAug 25, 2011
  36. Steffen Daode NurpmesoAug 18, 2011
  37. Junio C HamanoAug 18, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.