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

[PATCH 0/4] add -p: Term::ReadKey and more

From
Thomas Rast <trast@student.ethz.ch>
Date
Feb 2, 2009, 21:46 UTC
Message-ID
<1233611191-18590-1-git-send-email-trast@student.ethz.ch>
In-Reply-To
<7vljspjk8n.fsf@gitster.siamese.dyndns.org>

I added some more patches. 3/4 is the previous version, with code added to make / work (it just prompts for a regex) and a configuration variable added for Junio:

Junio C Hamano wrote:
> I'd appreciate if you can allow this "single stroke" mode to be optionally
> turned off by the end user.

I decided to disable it by default since it is an inconsistency between add -i and add -p for users of both, so if you want this feature, make sure to enable interactive.readkey. (I don't mind the inconsistency as I never use 'add -i'.)

I also removed the stray %control_chars from back when my draft versions used raw instead of cbreak mode, and consequently had to test for Ctrl-C themselves.

Finally, the first two patches fix small problems I saw while looking over the code, and 4/4 changes the color of error messages caused by keyboard input to color.interactive.help, lest they drown in the hunk that is automatically redisplayed.

Thomas Rast (4):
  add -p: change prompt separator for 'g'
  add -p: trap Ctrl-D in 'goto' mode
  add -p: prompt for single characters
  add -p: print errors in help colors
 Documentation/config.txt  |    6 ++++
 git-add--interactive.perl |   70 ++++++++++++++++++++++++++++++++++++--------
 2 files changed, 63 insertions(+), 13 deletions(-)
Next: Thomas Rast
Message 1 of 13 in “add -p: Term::ReadKey and more”
  1. 0/4 add -p: Term::ReadKey and moreThomas Rast, Feb 2, 2009
  2. 1/4 add -p: change prompt separator for 'g'Thomas Rast, Feb 2, 2009
  3. 2/4 add -p: trap Ctrl-D in 'goto' modeThomas Rast, Feb 2, 2009
  4. 3/4 add -p: optionally prompt for single charactersThomas Rast, Feb 2, 2009
  5. 4/4 add -p: print errors in help colorsThomas Rast, Feb 2, 2009
  6. Jeff KingFeb 3, 2009
  7. add -i: accept single-keypress inputThomas Rast, Feb 3, 2009
  8. Junio C HamanoFeb 3, 2009
  9. Thomas RastFeb 3, 2009
  10. Junio C HamanoFeb 4, 2009
  11. Thomas RastFeb 4, 2009
  12. Thomas RastFeb 4, 2009
  13. Junio C HamanoFeb 4, 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.