Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug report: compinit breaks path resolution in case-insensitive file system
- X-seq: zsh-workers 43222
- From: Leonardo dos Reis Gama <leonardo.reis.gama@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug report: compinit breaks path resolution in case-insensitive file system
- Date: Sun, 29 Jul 2018 16:43:14 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=tb0HZAVpYIIhoUmYoCqISZMymdiSgRlQ5HJ8WYSOd8k=; b=asQig3DkhTMiRpH7qIRIc0LrQQFEBEf7+g1b13Ucirqm1qcovLWJG3XTFunfEUtv1S zgjNgU48ibtf+n7HEu1K5O/VBbBjANufd+xGWlSaOjhPgtj4HP4is19U0dUOf6u4sJ6r TscFKaeqpXE8XzRjHfWWT7wjjgjfb+nrw1EYTwZEnhHxIXYD3S95levKW61WBitRm4tl r7pj/XzRQHfIWWqlh69a1e2I1qh5ENXED6MbNTsNLuq+4lO+4u7X2YAgAKiInBzGFkVj Efg8LFz8yJvU4KyYy/YlefbSHcHC956PZ1Xby5Zid2EOJZFO4iNOxfpoW4Mg6ji3AT/i cONQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I'm on macOS High Sierra (10.13.6) with a case-insensitive HFS+ file
system. The behaviour observed is identical with either the system's zsh
(/bin/zsh) of version 5.3 or the Homebrew's zsh (/usr/local/bin/zsh) of
version 5.5.1. Steps to reproduce:
1) Create two executable scripts with the same name but different cases as
follows
/tmp/a/cmd:
#!/bin/zsh
print a/cmd
/tmp/b/Cmd:
#!/bin/zsh
print b/Cmd
(Note the uppercase 'C' in the second file name)
2) Set PATH:
% PATH='/tmp/b:/tmp/a:/bin'
3) Run the following commands:
% zsh -fc 'cmd'
> b/Cmd
% zsh -fc 'autoload compinit; compinit; cmd' # this one is broken
> a/cmd
% zsh -fc 'autoload compinit; compinit; rehash; cmd' # this trick doesn't
work when my rc files are loaded
> b/Cmd
% zsh -fc 'cmd; autoload compinit; compinit; cmd'
> b/Cmd
> b/Cmd
% zsh -fc 'cmd; rehash; autoload compinit; compinit; cmd' # broken again
> b/Cmd
> a/cmd
% zsh -fc 'cmd; rehash; autoload compinit; compinit; rehash; cmd'
> b/Cmd
> b/cmd
Note: I know that case-insensitive file systems are broken by design and
it's not an absolute zsh fault. My specific problem was fixed by simply
renaming the "/tmp/b/Cmd" file to "/tmp/b/cmd", but I thought it would be
nice to report the issue even then. Hope it helps! ;)
Thank you for your attention.
Leonardo Gama
[image: https://]about.me/leogama
<https://about.me/leogama>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author