zsh-users
 help / color / mirror / 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

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ https://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git