zsh-users
 help / color / mirror / code / Atom feed
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: zsh-users@math.gatech.edu
Subject: mtools handling
Date: 04 Feb 1999 17:56:19 +0100	[thread overview]
Message-ID: <rbk8xym7kc.fsf@fphp16.tphys.physik.uni-tuebingen.de> (raw)

Hi,

a complain I've heard about zsh is that

mcopy a:* .

doesn't work like in bash, because zsh doesn't just give unmatched
globs to the programs (which is a GOOD thing). With this little code,
it works also in zsh, and you get a nifty tab completion, too :)
Perhaps it could be added to the examples section.

	Falk


my-mcopy () {
    mcopy `mtools-glob "$@"`
}

mtools-glob () {
  for i in "$@"; do
    case "$i" in
      [aAbB]:*)
        echo -n "$i "
        ;;
      *)
	echo -n "`eval echo $i` "
	;;
    esac
  done
  echo	      
}
alias mdir='noglob mdir'      # no glob expansion on mdir a:*
alias mdel='noglob mdel'
alias mcopy='noglob my-mcopy'

compctl -f -x 's[a:]' -s '`echo ${$(mdir -X)##*/}`' -- mdel mtype my-mcopy mcd mdeltree mdir mrd mren



                 reply	other threads:[~1999-02-04 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=rbk8xym7kc.fsf@fphp16.tphys.physik.uni-tuebingen.de \
    --to=falk.hueffner@student.uni-tuebingen.de \
    --cc=zsh-users@math.gatech.edu \
    /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).