From: dana <dana@dana.is>
To: Matthew Martin <phy1729@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: Add chmod builtin
Date: Sun, 17 Mar 2019 06:27:46 -0500 [thread overview]
Message-ID: <5A60CD98-F8E0-425F-AB77-C88DE7A9CBD2@dana.is> (raw)
In-Reply-To: <CAGnh9tCS+EU3BujFTQDwVLWxjsruxpdte05-BfgMSmOY8uX+Fw@mail.gmail.com>
On 16 Mar 2019, at 22:08, Matthew Martin <phy1729@gmail.com> wrote:
>Previously in #zsh "so sad that there is no zf_chmod". So here we are.
ty
One issue i mentioned when testing this is that it always follows symlinks
found in the tree when working recursively, which isn't how any real-world
chmod(1) works. The existing chown/chgrp built-ins have the same issue,
though, so it doesn't seem necessarily like a blocking thing.
>+if zmodload -e zsh/files && [[ $words[1] != */* ]]; then
I don't think this is reliable. It will detect any chmod as the built-in even
if only zf_chown is loaded (with -F). And `zmodload -e` always returns 1 for
modules loaded through selective auto-loading (-Fa), so it will *never*
detect the built-in in that case. (Not sure if that -e behaviour is intended?)
I know the $OSTYPE-$variant thing is dumb (should have passed $OSTYPE directly
to _pick_variant), but otherwise i think the method i used for distinguishing
the built-ins in _stat is fairly robust.
PS: Your patch seems to have corrupt white space
dana
next prev parent reply other threads:[~2019-03-17 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-17 3:08 Matthew Martin
2019-03-17 11:27 ` dana [this message]
2019-03-18 0:44 ` Matthew Martin
2019-03-18 1:28 ` dana
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=5A60CD98-F8E0-425F-AB77-C88DE7A9CBD2@dana.is \
--to=dana@dana.is \
--cc=phy1729@gmail.com \
--cc=zsh-workers@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).