[PATCH 1/2] Add 'cat' subcommand

Dirk Hohndel hohndel at infradead.org
Wed Apr 21 19:37:36 PDT 2010


On Wed, 21 Apr 2010 17:44:03 -0700, Carl Worth <cworth at cworth.org> wrote:
> On Tue, 20 Apr 2010 12:14:56 +0200, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> > On 20.4.2010 09:21, David Edmondson wrote:
> >  > I'm puzzled why you chose to pass a filename as the argument to 'cat'
> >  > rather than a message id (id:foo at bar.com)?
> > 
> > The reason is that I want be able to distinguish between several 
> > messages with the same id.
> 
> All other commands currently accept the generic search terms to specify
> messages, (even a command like "notmuch reply" for which it would have
> been natural to accept only a single message).
> 
> So I'd prefer to have this command behave just like all others and use
> the same naming.
> 
> The question of how to unambiguously refer to a single file is
> orthogonal, (and similarly applies to all commands, such as "notmuch
> tag" etc.). I would recommend supporting a search syntax something like:
> 
> 	filename:/complete/path/to/file

should we extend this to something generic that allows remote
specifications? 

URI:file/path/to/local/file
URI:ssh/user at host/path/to/file
URI:git/user at host/path/to/file

or even (yikes)

URI:ftp/user at host/path/to/file
 
I'm using '/' to separate components, assuming that ':' should be used
only for keywords in the search syntax - if the parser is flexible
enough we could of course use the standard URI syntax instead
http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax

foo://username:password@example.com:8042/over/there/index.dtb?type=animal;name=ferret#nose

That would allow to encode the query in a standard way in the remote
syntax... 

/D

-- 
Dirk Hohndel
Intel Open Source Technology Center


More information about the notmuch mailing list