From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24636 invoked by alias); 15 Aug 2017 04:24:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22827 Received: (qmail 1675 invoked by uid 1010); 15 Aug 2017 04:24:07 -0000 X-Qmail-Scanner-Diagnostics: from mta01.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(24.224.136.30):SA:0(-2.6/5.0):. Processed in 3.093747 secs); 15 Aug 2017 04:24:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Authority-Analysis: v=2.2 cv=b5/C2pOx c=1 sm=1 tr=0 a=8gj3v1wGPP1N//wMR4mB5g==:117 a=8gj3v1wGPP1N//wMR4mB5g==:17 a=IkcTkHD0fZMA:10 a=3bAGhoY-GNDwinOTSCgA:9 a=QEXdDO2ut3YA:10 X-EL-IP-NOAUTH: 24.207.98.138 Subject: Re: PATH_DIRS To: zsh-users@zsh.org References: <1852003c-c07c-dc61-b863-007f0cef9111@eastlink.ca> From: Ray Andrews Message-id: <95eb4234-b82c-f445-e21f-5fb99d689562@eastlink.ca> Date: Mon, 14 Aug 2017 20:53:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit Content-language: en-CA On 13/08/17 08:20 PM, Bart Schaefer wrote: > With PATH_DIRS set, you can run ". myscript" > with or without that executable permission on the file (it need only be readable). Then how do I get these results?: /aWorking/Zsh/Source 3$ unsetopt pathdirs # This directory is not on the path /aWorking/Zsh/Source 3$ chmod -x ../System/somescript # Referring here to somescript which is on the path. /aWorking/Zsh/Source 3$ somescript zsh: permission denied: somescript # As expected /aWorking/Zsh/Source 3$ . somescript this is somescript # As expected /aWorking/Zsh/Source 3$ chmod +x ../System/somescript /aWorking/Zsh/Source 3$ somescript # As expected this is somescript /aWorking/Zsh/Source 3$ . somescript this is somescript # As expected /aWorking/Zsh/Source 3$ setopt pathdirs # But the results are unchanged: /aWorking/Zsh/Source 3$ chmod -x ../System/somescript /aWorking/Zsh/Source 3$ somescript zsh: permission denied: somescript /aWorking/Zsh/Source 3$ . somescript this is somescript /aWorking/Zsh/Source 3$ chmod +x ../System/somescript /aWorking/Zsh/Source 3$ somescript this is somescript /aWorking/Zsh/Source 3$ . somescript this is somescript ... what am I doing wrong?