zsh-users
 help / color / mirror / code / Atom feed
* mtools handling
@ 1999-02-04 16:56 Falk Hueffner
  0 siblings, 0 replies; only message in thread
From: Falk Hueffner @ 1999-02-04 16:56 UTC (permalink / raw)
  To: zsh-users

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-02-04 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-04 16:56 mtools handling Falk Hueffner

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).