[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] attach
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] attach |
Date: |
Sat, 15 Sep 2012 17:26:11 +0100 |
Hi,
> David Levine <address@hidden> writes:
> > Note that whatnow's attach will continue to allow attachment of
> > directories because it expands those out to their contents. It
> > doesn't check what the contents are, though. That's why we needed
> > to add this check.
I wonder if whatnow's `attach foo' attaching foo/* when it's a directory
is surprising and it would be better to error, forcing the user to
specify foo/* if that's what they want. Especially if foo wasn't the
single explicitly named argument but itself part of a glob expansion
before ls(1) was let loose. Using `ls -d' would stop it expanding foo
to its contents allowing later code to stat(2) that it's not a plain
file.
I suppose ditching ls(1) for glob or wordexp would also stop this being
the default behaviour.
Cheers, Ralph.
- Re: [Nmh-workers] I'm confused, (continued)