Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ${i:r}-question
- X-seq: zsh-users 9352
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: ${i:r}-question
- Date: Sun, 28 Aug 2005 03:07:09 +0000
- In-reply-to: <20050828.025528.59463603.Meino.Cramer@xxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050826.183216.75189062.Meino.Cramer@xxxxxx> <1050827204440.ZM11639@xxxxxxxxxxxxxxxxxxxxxxx> <20050828.025528.59463603.Meino.Cramer@xxxxxx>
On Aug 28, 2:55am, Meino Christian Cramer wrote:
} Subject: Re: ${i:r}-question
}
} The code fragment
}
} ${${(M)afile%%(.tar|).(7z|bz2|gz)}#.}
}
} would fail on files, which are of the pattern
}
} zsh-4.2.5-doc.bz2 (only one extension)
What makes you think so?
schaefer[501] afile=zsh-4.2.5-doc.bz2
schaefer[502] print ${${(M)afile%%(.tar|).(7z|bz2|gz)}#.}
bz2
schaefer[503] afile=zsh-4.2.5-doc.tar.gz
schaefer[504] print ${${(M)afile%%(.tar|).(7z|bz2|gz)}#.}
tar.gz
Note that (.tar|) has an empty sub-pattern to the right of the vertical
bar, so it means ".tar or nothing".
} or? (and all files, which are no Makefiles.... ;O)
I'm afraid I don't understand what you mean about files that are not
Makefiles.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author