Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alternation option end of string
- X-seq: zsh-users 30615
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: alternation option end of string
- Date: Sat, 2 May 2026 06:57:36 +0200
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+xGHsPqJtMdYnoh07h8pH8Y+7Cht90yGbqq5LAOcbq4=; fh=D6X9xIaVjTSxb6gwuCseglo0uxyISp24IsyxMp5sRU4=; b=RiA1A9qWSkE6g+gIoBHlRKzsdejyC84/lOTPwJ4kLCgF2fXoL+L33/YerWLtQlTHJi dT/XlXFK6www87e91a2mMM0F6JRTH3QgY3SuQh6IW3nGBvSZRBENNSpO6ELsudSkkoP8 WPfZydxb0JI/ZX3hfZ08Ck+AkdzWfLGYBJZ9F69KF7XxlVie6XzRScE7wLxxLoQoUde4 p19kkNmMHxsiH0+bfRBjYo4uJvb8Jo0/74dTOanWVM3mNkAwqXaEPNxBmYWrJ/8YWn1C X43hGxCCUFW3ejNifkrtamSc9r0Xk7sq+wbfGYKkzVxjnscfn+wyDQIA6yxusS8JmnRX O0Kw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1777697870; cv=none; d=google.com; s=arc-20240605; b=NNXOS0qrrI1rvNR+Qr8DW41Gi9vyeECQLhqPgcA6N/2IwCN/0XmKV/V/ebLICUCpXb +m/mBI0WpSKMH5Q19KwBdctz+5hvIzugtCFePvTZ5tiRE/xZn6PNuztFTH2v8oscQZoc df1VdCjFI91NnbzYVAGX/1qvCe15r0ZZ6If7y0/qSw87ACEOZGzH4G1uRoT+sbekFiKB d8wuToS/RjlWSlP23rENeUSAFqnjKE7aMR/M3YS6siZ4R34QsPAnLk8Z0j39G6Q/df/h 0UwHfxWXdxLKtU45em3U2CtXMCOhF4xTL9UZypH4sKXeAXG99SM3b69DQj3yjLwA7Lma 5Wig==
- Archived-at: <https://zsh.org/users/30615>
- In-reply-to: <e18cfb47-8ca6-4e13-b6e1-e333f7547b59@eastlink.ca>
- List-id: <zsh-users.zsh.org>
- References: <b145bb3c-51ee-4088-8b6b-12c6b440d9e6@eastlink.ca> <CAA=-s3wEGdY1Ts1bO+vH-Z8C7RH8d2CWXERF+SxAtXFpGoxgNA@mail.gmail.com> <89738d31-840a-4bb5-ab7e-55d60f9ab52c@eastlink.ca> <61062ae9-d338-4036-8a4d-5c35c8c84b6d@eastlink.ca> <0357522b-3917-4be2-b969-2b1a7481115c@gmx.com> <e18cfb47-8ca6-4e13-b6e1-e333f7547b59@eastlink.ca>
On Sat, May 2, 2026 at 6:45 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
>
> On 2026-05-01 17:44, Eric Cook wrote:
> > So, bart guessed correct, you are using pattern matching.
> > string=cats; print -- ${(M)string##cat(s|)}
> I wonder if I have my terminology correct -- I thought Bart was
> suggesting that I was matching filenames -- globbing, yes? But it was
> me who said that, no, I'm doing pattern matching. The strings are in
> fact filenames, but in the current situation they're just strings,
> there's no completion of lists of files so I'm not calling that globbing.
globbing and (zsh) string matching are nearly identical, so most
people tend to use either term for both things. The main difference is
that * can match across a / in string matching but not in globbing.
Ie, a*b will match "a/b" but not the file a/b, but pretty much
everything else works the same (where applicable).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author