From: Meino Christian Cramer <Meino.Cramer@gmx.de>
To: schaefer@brasslantern.com
Cc: zsh-users@sunsite.dk
Subject: Re: ${i:r}-question
Date: Sun, 28 Aug 2005 07:12:21 +0200 (CEST) [thread overview]
Message-ID: <20050828.071221.74749387.Meino.Cramer@gmx.de> (raw)
In-Reply-To: <1050828030710.ZM11889@candle.brasslantern.com>
From: Bart Schaefer <schaefer@brasslantern.com>
Subject: Re: ${i:r}-question
Date: Sun, 28 Aug 2005 03:07:09 +0000
Hi Bart !
> 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".
Ah, I see... !!! ENLIGHTMENT! (my previous reply...it was to deep in
the night....sorry)
>
> } 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.
>
Oh shit...again a fault of mine (I should not write mails in the
night...) --> ${(M)afile was {${(M)akefile in my eyes...
I will try to make my script run with your suggestions, Bart !
Thanks a lot fo ryour help !
Keep zshing!
Meino
prev parent reply other threads:[~2005-08-28 5:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-26 16:32 ${i:r}-question Meino Christian Cramer
2005-08-27 17:11 ` ${i:r}-question zzapper
2005-08-27 17:41 ` ${i:r}-question Meino Christian Cramer
2005-08-27 20:44 ` ${i:r}-question Bart Schaefer
2005-08-28 0:55 ` ${i:r}-question Meino Christian Cramer
2005-08-28 3:07 ` ${i:r}-question Bart Schaefer
2005-08-28 5:12 ` Meino Christian Cramer [this message]
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=20050828.071221.74749387.Meino.Cramer@gmx.de \
--to=meino.cramer@gmx.de \
--cc=schaefer@brasslantern.com \
--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).