monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] zsh completion, "monotone list authors", "monotone list


From: Bruce Stephens
Subject: [Monotone-devel] zsh completion, "monotone list authors", "monotone list dates"?
Date: Tue, 08 Nov 2005 20:11:42 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I noticed the completion for zsh is a bit out of date, so I started
playing with it (with little progress so far, because I got distracted
into working out how to parse the output of "monotone automate
certs", so I was fighting with zsh parameter expansion).

I thought it might be handy to be able to complete selectors.  For
some selectors, completion isn't so useful (if you want to complete on
things in changelogs, for example), but for authors it seems useful,
but I don't see a way to get a list of authors.  (Well, monotone db
execute "select distinct(unbase64(value)) from revision_certs where
name='author'", works, but that probably doesn't count.)  Similarly
for dates.

Would anyone object if I worked on a patch to add "list authors" and
"list dates", which would just list all of them?  

Alternatively, maybe it would be better to have a way to match
prefixes?  Something like "monotone list dates 2005-10"?  (Actually,
zsh could use a more general pattern, so 2005*26 might usefully list
2005-10-26T03:22:38 (I'm imagining the cursor being on the *), but
that's probably not useful enough to bother with.)  

And if you attached bugids as certs, then I could imagine it being
handy to be able to get a list of those certs, too.  But then there's
more of a danger of multiline values, and that probably involves more
issues.  For completion, it would probably be OK just to print them
out, multiple lines and all, but then that wouldn't let you reliably
count the number of such values.  Maybe that doesn't matter, though:
you'd use "list ..." to get some text, and then get the actual values
(once you'd got the revision id) with "automate certs" which gives the
things coherently quoted.


But maybe that's not enough.  It might be nice to get a list of things
in the context of a partial selector.  So if I type (as a revision)
"net.venge.monotone/njs/2005" and then TAB (or whatever I'm using to
complete), it might be useful to get dates of revisions in that branch
by an author containing "njs".  So I guess that for that I'd want

   monotone list dates net.venge.monotone/njs 2005

or

   monotone list --selector=net.venge.monotone/njs dates 2005

or something?

Which might be handy for tags, I guess, and maybe even branches (you
could see which branches have been touched in some month, or by some
author)?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]