zsh-users
 help / color / mirror / code / Atom feed
From: Sven Guckes <guckes@math.fu-berlin.de>
To: ZShell Users <zsh-users@sunsite.dk>
Subject: global alias as function - "--attach"
Date: Wed, 11 Jun 2003 15:13:17 +0200	[thread overview]
Message-ID: <20030611131317.GA13170@math.fu-berlin.de> (raw)

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


             reply	other threads:[~2003-06-11 13:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-11 13:13 Sven Guckes [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030611131317.GA13170@math.fu-berlin.de \
    --to=guckes@math.fu-berlin.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).