From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15688 invoked by alias); 10 Aug 2017 22:20:04 -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: 22809 Received: (qmail 15658 invoked by uid 1010); 10 Aug 2017 22:20:04 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f174.google.com 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(209.85.216.174):SA:0(0.5/5.0):. Processed in 5.007625 secs); 10 Aug 2017 22:20:04 -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=0.5 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xf0NfYNcb8RcSkVMGPkEpkyLvtCP8rt68I1cQfk8zts=; b=kJV9nKGPJFWGAqOoCez/H+PZS5V2wPYwfzt5eUImJ+ci4SGLJMD7ERIJLxc85TB5H4 RyWI4Y+NJ22W9t/kghSsUnU16KR8nXB6auK4/I+mAporaCsBJWmSeGzfOiioEyeCVyvD +A/5S7xYGVotMgOlVxCDNP+g1GiPV8UFHkUgayr4DxkFja6dvda0R7eXgvawpNAmpfJI l0rTGtR5F3uwjCKhTu+kOhzzMMod+3eNUPhZU2z1up4HOPcRQExWqDLZjnZQBz4p3Nq3 HxP6HQqMR5Uv9+n/fT4W4QUbIaAUO8/XR254niqqPgtB+AR4ZPTlO9jgHQccQVQ1n3Jd NYWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xf0NfYNcb8RcSkVMGPkEpkyLvtCP8rt68I1cQfk8zts=; b=M3cLRQYCuYS/HI/vTfFbzB3RCKBOn6tzz809XON0ZQ2okv1MfCJSvoXcKn4JXgz0jb vG1AjlD7DXKja0HkGtx7LjkCxvdQtOq/DBB3ye1+oquTSIUAFwrbREI535YV9394P3Lr jKMUVOhYiWy/UcJDiWoECgjBZUsppOrvyjob3M7Z6K07CvGdj6CCm1XVGVhtVUWxIXaZ 5D6H4Um5WaseTo2APhIbeDgecq16FFh8NC0/Jcl4Zfv0EuNSwjmDfKidPhC8D4+JjMy8 BTIV0mbQOzu1e/ykPUrAQFtf4XxW591E97D5kwwVVdPQhJEHFcFf8SQViZzsaSNaF7Yb nNIQ== X-Gm-Message-State: AHYfb5hzIuMob1T7jhPfpJRr6dtG8zuyPdV3O0N5OudiNAhiDtYsQVWT VC5g0M+5gnyYBuOBuKmhMUl07aEpv2hK X-Received: by 10.200.0.155 with SMTP id c27mr17736977qtg.322.1502403588313; Thu, 10 Aug 2017 15:19:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Bart Schaefer Date: Thu, 10 Aug 2017 15:19:47 -0700 Message-ID: Subject: Re: PATH_DIRS To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Thu, Aug 10, 2017 at 2:46 PM, Ray Andrews wrote: > Noticing how PATH_DIRS behaves in a way parallel or complementary to PATH, I > wonder if whence might be tweaked to search for scripts on PATH_DIRS PATH_DIRS is a setopt, it *uses* $PATH. It's not a parameter providing alternate directories. Anyway, it already does search like that. You just have to chmod +x the script files (and add a #! line if they aren't zsh scripts). What it WON'T do is source scripts it finds that way into the current shell. It'll always fork a subshell for them. Too many opportunities for mayhem if the user hasn't explicitly asked (via the "." command) to have his current shell altered (potentially) by the script.