Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATH_DIRS
- X-seq: zsh-users 22809
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: PATH_DIRS
- Date: Thu, 10 Aug 2017 15:19:47 -0700
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <ff4bbb1d-10a9-d95f-a721-4afca5fdf95d@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <ff4bbb1d-10a9-d95f-a721-4afca5fdf95d@eastlink.ca>
On Thu, Aug 10, 2017 at 2:46 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author