zsh-users
 help / color / mirror / code / Atom feed
From: Aryn Starr <whereislelouch@icloud.com>
To: Stephane Chazelas <stephane.chazelas@gmail.com>
Cc: Zsh Users List <zsh-users@zsh.org>
Subject: Re: Help wanted with debugging a weird glob behavior
Date: Tue, 20 Aug 2019 13:32:31 +0430	[thread overview]
Message-ID: <A227EBEE-60CC-460D-BBAD-D5E0A3386B4B@icloud.com> (raw)
In-Reply-To: <20190820082150.usmq3gmh3wdipg3g@chaz.gmail.com>

Indeed, I do have `nocaseglob` :) Can’t zsh be made to try to match the decomposed form, too? (Perhaps as a new option?) I don’t think putting `iconv`s everywhere is a sustainable practice …
Apart from that, I think it’s a good idea to create a helper script, `zsh-doctor`, that warns users of such possible edge cases in their config. It can check if they are on macOS and have nocaseglob enabled, and print an appropriate warning. In time, this script might save people a lot of trouble.
(github is probably a better home for such a diagnostic script, since it is more accessible and easier to do pull requests and stuff in …)

PS: I’m actually on APFS, not HFS. 

> On Aug 20, 2019, at 12:51 PM, Stephane Chazelas <stephane.chazelas@gmail.com> wrote:
> 
> 2019-08-20 12:21:44 +0430, Aryn Starr:
>> Indeed, using `echo "${$(cat path | iconv -f UTF-8-MAC -t UTF-8):h}”/*` works!
>> Seeing that `zsh -f` works correctly without this shenanigan, is there an option that disables this? I have oh-my-zsh installed, which might have set an option to that effect ...
> [...]
> 
> [back on-list]
> 
> You probably have the nocaseglob option on. That means that zsh
> does read the content of directories to find matches and since
> zreaddir returns é in its precomposed form (U+00E9), it matches
> neither e<U+0301> (the decomposed form of é) nor E<U+0301> (the
> decomposed form of É).
> 
> Not much you can do about it (except that iconv conversion or
> install a proper OS ;-)).
> 
> If you disable that zsh work around (for which I think you
> need to recompile zsh), then you'll probably get worse problems.
> 
> -- 
> Stephane


  parent reply	other threads:[~2019-08-20  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0628A0E5-63F0-481E-AEC2-962658134620__9154.55124793283$1566242642$gmane$org@icloud.com>
2019-08-20  7:37 ` Stephane Chazelas
     [not found]   ` <227BE55C-4B7E-4CAD-B212-D48F663BC09D@icloud.com>
2019-08-20  8:21     ` Stephane Chazelas
2019-08-20  8:47       ` Roman Perepelitsa
2019-08-20  9:02       ` Aryn Starr [this message]
     [not found]       ` <A227EBEE-60CC-460D-BBAD-D5E0A3386B4B__40377.5387721666$1566291837$gmane$org@icloud.com>
2019-08-20 11:04         ` Stephane Chazelas
2019-08-19 19:22 Aryn Starr
2019-09-17 15:30 ` Mikael Magnusson

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=A227EBEE-60CC-460D-BBAD-D5E0A3386B4B@icloud.com \
    --to=whereislelouch@icloud.com \
    --cc=stephane.chazelas@gmail.com \
    --cc=zsh-users@zsh.org \
    /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).