zsh-users
 help / color / mirror / code / Atom feed
* case sensitive globbing
@ 2021-09-29 10:20 Pier Paolo Grassi
  2021-09-29 10:27 ` Roman Perepelitsa
  0 siblings, 1 reply; 6+ messages in thread
From: Pier Paolo Grassi @ 2021-09-29 10:20 UTC (permalink / raw)
  To: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

Hello, I have case_glob unset. should:

*a*

match the file Abc or not? I think it should, but I don't get it to unless
I specify

(#i)*a*

I have extendedglob set, if that matters

thanks

Pier Paolo Grassi

[-- Attachment #2: Type: text/html, Size: 562 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: case sensitive globbing
  2021-09-29 10:20 case sensitive globbing Pier Paolo Grassi
@ 2021-09-29 10:27 ` Roman Perepelitsa
  2021-09-29 10:32   ` Pier Paolo Grassi
  0 siblings, 1 reply; 6+ messages in thread
From: Roman Perepelitsa @ 2021-09-29 10:27 UTC (permalink / raw)
  To: Pier Paolo Grassi; +Cc: Zsh-Users List

On Wed, Sep 29, 2021 at 12:21 PM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
>
> Hello, I have case_glob unset. should:
>
> *a*
>
> match the file Abc or not?

Yes, in locales where 'a' is lowercase 'A' it should.

    () {
      emulate -L zsh -o no_case_glob
      local LC_ALL=C
      touch Abc
      print -r -- *a*
    }

    Abc

Does this work for you?

Roman.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: case sensitive globbing
  2021-09-29 10:27 ` Roman Perepelitsa
@ 2021-09-29 10:32   ` Pier Paolo Grassi
  2021-09-29 10:39     ` Roman Perepelitsa
  0 siblings, 1 reply; 6+ messages in thread
From: Pier Paolo Grassi @ 2021-09-29 10:32 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

Yes, it works.
I thought case_glob was unset because I wasn't seeing it in the list
produced by setopt, but it seem that one should explicitly call setopt
no_case_glob like you showed me to

thanks

Pier Paolo Grassi


Il giorno mer 29 set 2021 alle ore 12:27 Roman Perepelitsa <
roman.perepelitsa@gmail.com> ha scritto:

> On Wed, Sep 29, 2021 at 12:21 PM Pier Paolo Grassi <pierpaolog@gmail.com>
> wrote:
> >
> > Hello, I have case_glob unset. should:
> >
> > *a*
> >
> > match the file Abc or not?
>
> Yes, in locales where 'a' is lowercase 'A' it should.
>
>     () {
>       emulate -L zsh -o no_case_glob
>       local LC_ALL=C
>       touch Abc
>       print -r -- *a*
>     }
>
>     Abc
>
> Does this work for you?
>
> Roman.
>

[-- Attachment #2: Type: text/html, Size: 1445 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: case sensitive globbing
  2021-09-29 10:32   ` Pier Paolo Grassi
@ 2021-09-29 10:39     ` Roman Perepelitsa
  2021-09-29 10:46       ` Pier Paolo Grassi
  2021-09-29 14:37       ` Vin Shelton
  0 siblings, 2 replies; 6+ messages in thread
From: Roman Perepelitsa @ 2021-09-29 10:39 UTC (permalink / raw)
  To: Pier Paolo Grassi; +Cc: Zsh-Users List

On Wed, Sep 29, 2021 at 12:33 PM Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
>
> I thought case_glob was unset because I wasn't seeing it in the list produced by setopt

`setopt` without arguments only shows options that differ from their
values in the baseline emulation mode. Your baseline emulation mode is
probably 'zsh', which has `case_glob` set, so `setopt` will only print
`case_glob` if it's unset. You can see all options with `set -o`.

Roman.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: case sensitive globbing
  2021-09-29 10:39     ` Roman Perepelitsa
@ 2021-09-29 10:46       ` Pier Paolo Grassi
  2021-09-29 14:37       ` Vin Shelton
  1 sibling, 0 replies; 6+ messages in thread
From: Pier Paolo Grassi @ 2021-09-29 10:46 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

That's useful, thanks!

Pier Paolo Grassi


Il giorno mer 29 set 2021 alle ore 12:39 Roman Perepelitsa <
roman.perepelitsa@gmail.com> ha scritto:

> On Wed, Sep 29, 2021 at 12:33 PM Pier Paolo Grassi <pierpaolog@gmail.com>
> wrote:
> >
> > I thought case_glob was unset because I wasn't seeing it in the list
> produced by setopt
>
> `setopt` without arguments only shows options that differ from their
> values in the baseline emulation mode. Your baseline emulation mode is
> probably 'zsh', which has `case_glob` set, so `setopt` will only print
> `case_glob` if it's unset. You can see all options with `set -o`.
>
> Roman.
>

[-- Attachment #2: Type: text/html, Size: 1238 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: case sensitive globbing
  2021-09-29 10:39     ` Roman Perepelitsa
  2021-09-29 10:46       ` Pier Paolo Grassi
@ 2021-09-29 14:37       ` Vin Shelton
  1 sibling, 0 replies; 6+ messages in thread
From: Vin Shelton @ 2021-09-29 14:37 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Pier Paolo Grassi, Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

this is why I use kshoptionprint

On Wed, Sep 29, 2021 at 6:39 AM Roman Perepelitsa <
roman.perepelitsa@gmail.com> wrote:

> On Wed, Sep 29, 2021 at 12:33 PM Pier Paolo Grassi <pierpaolog@gmail.com>
> wrote:
> >
> > I thought case_glob was unset because I wasn't seeing it in the list
> produced by setopt
>
> `setopt` without arguments only shows options that differ from their
> values in the baseline emulation mode. Your baseline emulation mode is
> probably 'zsh', which has `case_glob` set, so `setopt` will only print
> `case_glob` if it's unset. You can see all options with `set -o`.
>
> Roman.
>
>

[-- Attachment #2: Type: text/html, Size: 1105 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-29 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 10:20 case sensitive globbing Pier Paolo Grassi
2021-09-29 10:27 ` Roman Perepelitsa
2021-09-29 10:32   ` Pier Paolo Grassi
2021-09-29 10:39     ` Roman Perepelitsa
2021-09-29 10:46       ` Pier Paolo Grassi
2021-09-29 14:37       ` Vin Shelton

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