Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Adding Text to Each Match



Is there a non-loop way to replicate text for each filename matching a
pattern?  For example, I'm trying to generate e-mail messages with
attachments that match a pattern to send with mutt.  Each attachment
needs to be specified with the -a option.

   echo body | mutt -a file1_foo -a file2_foo \
                    -s "Here's your foo" username

Is there something in zsh that would let me say

   echo body | mutt [prefix all matches to *foo with -a] \
                    -s "Here's your foo" username

that would expand to the command listed above?

I think there's been some talk of this, but I don't know what to search
for in the archives.  Thanks for your help!

-- 
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson



Messages sorted by: Reverse Date, Date, Thread, Author