Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing with interposition
- X-seq: zsh-users 8698
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Eric Smith <es@xxxxxxxxxxxx>
- Subject: Re: globbing with interposition
- Date: Tue, 19 Apr 2005 09:50:58 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <20050419072115.GA15936@xxxxxxxxxxxx>
- Mail-followup-to: Eric Smith <es@xxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050419072115.GA15936@xxxxxxxxxxxx>
Hi Eric :)
* Eric Smith <es@xxxxxxxxxxxx> dixit:
> So, I would like to do something like this (which obviously
> dont work) in order to achieve the above.
>
> mutt eric -a fotos* -s "all images attached" </dev/null
Quick'n'dirty hack (obviously must exist a better solution):
mutt eric `for file in * ; print -- -a $file' -s ...
The main problem is that this doesn't work with files that has
spaces in the name. If mutt doesn't need a space between '-a' and the
file name for the attach, you can do this:
mutt eric "`for file in * ; print -- -a $file'" -s ...
This quotes the space between the '-a' and the filename. I don't
know of any other solution that you can use in the command line. If
you need selective quoting you can 'build' the command line:
commandline=(mutt eric)
for file in *
do
commandline+=(-a "$file")
done
commandline+=(-s "all...")
After that, you run this:
$ $commandline </dev/null
Hope that helps :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author