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

Re: [PATCH v4 3/4] add -p: prompt for single characters

From
Jeff King <peff@peff.net>
Date
Feb 6, 2009, 14:01 UTC
Message-ID
<20090206140126.GA18364@coredump.intra.peff.net>
In-Reply-To
<1233822507-9612-1-git-send-email-trast@student.ethz.ch>
On Thu, Feb 05, 2009 at 09:28:26AM +0100, Thomas Rast wrote:
Show 7 quoted lines
> +my $use_readkey = 0;
> +if ($repo->config_bool("interactive.singlekey")) {
> +	eval {
> +		use Term::ReadKey;
> +		$use_readkey = 1;
> +	};
> +}

Sorry, I am way behind on git mails, so I didn't catch this sooner. But it should be "require Term::ReadKey", as "use" statements are done at compile time:

  $ perl -e 'eval { use Bogosity } or print "not found\n"'
  Can't locate Bogosity.pm in @INC ...
  $ perl -e 'eval { require Bogosity } or print "not found\n"'
  not found

So add--interactive in 'next' is currently broken on non-readkey platforms.

-Peff
Previous: Thomas RastNext: Thomas Rast
Message 3 of 8 in “add -p: prompt for single characters”
  1. 3/4 add -p: prompt for single charactersThomas Rast, Feb 5, 2009
  2. 4/4 add -p: print errors in separate colorThomas Rast, Feb 5, 2009
  3. Jeff KingFeb 6, 2009
  4. add -p: import Term::ReadKey with 'require'Thomas Rast, Feb 6, 2009
  5. Jeff KingFeb 6, 2009
  6. Thomas RastFeb 6, 2009
  7. Jeff KingFeb 7, 2009
  8. Junio C HamanoFeb 7, 2009

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.