zsh-users
 help / color / mirror / code / Atom feed
* global alias as function - "--attach"
@ 2003-06-11 13:13 Sven Guckes
  2003-06-11 15:53 ` DervishD
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sven Guckes @ 2003-06-11 13:13 UTC (permalink / raw)
  To: ZShell Users

can i use a global alias as a function within a command?

the real problem:
someone asked (yet again) whether mutt (the mailer)
can attach a list of files or a directory of files.
this is not possible yet - mutt can only attach files given
on the command line when *every* file is preceded by "-a".

suggestion:
a patch might get this to work (as usual).
however, i can imagine something like this:

  mutt --attach file dir/ -xyz

here, the "--attach" would be a global alias
which test the following parameters for
files and files within directories.

if these are existing files and directories then
they are simply attached each file (or file within
a given directory) by expanding it to "-a file":

  mutt -a file -a dir/file1 -a dir/file2 -xyz

however, i am not sure how this can be achieved.
the global alias might contain a backtick, of course -
but where should the closing backtick come from? hmm..

maybe there is an even simpler way of solving this.

i have to admit that i did not do any
manual reading or searching the web.
if this has been discussed before
then i'd appreciate some pointers.
key words, URLs etc are fine.
thanks! :-)

Sven


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-11 20:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-11 13:13 global alias as function - "--attach" Sven Guckes
2003-06-11 15:53 ` DervishD
2003-06-11 16:00 ` Stephen Rueger
2003-06-11 17:44 ` Pavol Juhas
2003-06-11 20:33 ` Thorsten Haude

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).