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

cg-prev and cg-next

From
ZBZack Brown <zbrown@tumblerings.org>
Date
Oct 13, 2005, 14:38 UTC
Message-ID
<20051013143852.GA5057@tumblerings.org>
Hi folks,

Sometimes I just want to surf through a project's history, getting a sense of where I was over time. So I wrote these short scripts to let me do that easily:

cg-prev:
    cg-seek `cg-log | grep "^commit " | head -n 2 | tail -n 1 | cut -d ' ' -f 2`
cg-next:
    CURRENT=`cg-log | grep "^commit " | head -n 1`       
    cg-seek > /dev/null
    cg-seek `cg-log | grep "^commit " | grep -B 1 "^$CURRENT" | head -n 1 | cut -d ' ' -f 2`
Even better, I guess would be to be able to do something like this:

$ cg-seek next $ cg-seek prev

and have it do the right thing.

Be well, Zack

-- 
Zack Brown
Message 1 of 1 in “cg-prev and cg-next”
  1. Zack BrownOct 13, 2005

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.