[darcs-users] query manifest --directories default

Max Battcher me at worldmaker.net
Wed Jul 18 05:32:07 UTC 2007


On 7/17/07, Alan Bram <alan.bram at oracle.com> wrote:
> > I'm not sure how I feel about list.  I'm slightly nervous about it being
> > too 'similar' to the other commands (sorry, very vague), or it being too
> > specific to things that can be listed.
> >
> > For example, what do you suggest the 'query cat' command be named under
> > the 'list' supercommand?  (query cat would print out a specific version
> > of a file, i.e. --matches, --from-tag, etc)
>
> I'm sorry -- I don't understand this.  What's wrong with "darcs cat"?
> My point being, does "cat" need to be a subcommand of something else?

Right.  I understand the want to minimize the surface area of top
level commands, but I think it certainly doesn't hurt to question what
goes where.

As for ``query cat``, I've always felt that to be a bad, but
acceptable name.  If it stays as ``cat``, I'd probably keep it ``query
cat``, but I'd debate finding a more appropriate/meaningful
super-command and/or just promoting it to the top level.  ``darcs
list`` works well when thinking of nouns (or "repo-controlled
objects") and so the question becomes not "what does cat do", but
"what information is represented by cat", to which the answer is "file
content".  So you could consider using something like ``darcs list
file-content`` (maybe someone can come up with a smarter name than
"file-content", even), which is nice and extremely informative and
intuitive to first time users, if unfortunately a bit more typing than
``cat``.  But, with hidden/not-so-hidden aliases you could always have
the (excuse the pun) pet name "cat" stick to the user-intuitive "darcs
list file-contents``, and "everybody wins".

I actually think that makes a decent proposal:

``darcs list file-content`` as the ``darcs help`` visible way to do it
and ``darcs cat`` as the silent and nicely terse "hidden" shortcut.

While we're at it, a couple other recommendations of good objects to
make "list-able":

darcs list patch-content  # Another way to get darcs annotate of a
single patch to get the dpatch
darcs list contributors # List of patch authors

-- 
--Max Battcher--
http://www.worldmaker.net/



More information about the darcs-users mailing list