On Sun, Mar 17, 2019 at 6:27 AM dana wrote: > >+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. Reading the docs for _pick_variant, there's a -b option to detect builtins. It has some issues (namely with precommands), but those can be fixed in a separate commit. Requires some reindenting, so I've split the patch in two. > PS: Your patch seems to have corrupt white space Gmail hasn't been sending mails sent via mutt for the past few months. Not sure what's causing it, but I've had to resort to using the web interface which seems to mangle whitespace. I've attached the patches and they're on my github repo as well.