zsh-users
 help / color / mirror / code / Atom feed
From: Jim <linux.tech.guy@gmail.com>
To: zsh-users@zsh.org
Subject: Re: PATH_DIRS
Date: Sun, 20 Aug 2017 05:59:46 -0500	[thread overview]
Message-ID: <CA+rB6G+vCPW2=jYBix-cvAhHAD5e2H25ffY5mpobrMfDsZjx0A@mail.gmail.com> (raw)
In-Reply-To: <273e7e71-ede6-09e1-88e3-dcfc425e5544@eastlink.ca>

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

Hi Ray,

On Wed, Aug 16, 2017 at 11:22 AM, Ray Andrews <rayandrews@eastlink.ca>
wrote:

> On 15/08/17 10:32 AM, Bart Schaefer wrote:
>
>> On Tue, Aug 15, 2017 at 9:50 AM, Jim <linux.tech.guy@gmail.com> wrote:
>>
>>> Nothing, as far as I can tell.  I believe it is your point of view what
>>> PATH_DIRS is doing.  As long as "somescript" is in your PATH,
>>> I don't believe PATH_DIRS is doing much if anything.
>>>
>> Right, I got a bit confused about what Ray was asking
>>
> Sometimes even the question contains errors, so thereyago  we can't expect
> mindreading.
>
> At the end of the day all I want is for whence to show me sourcable
> scripts as well as +x scripts.  Since sourcable scripts are found and run
> according to PATH etiquette  (although the current dir is also always
> searched and we have the PATH_DIR option as well) I want whence to inform
> me what command will be run if I type it and press enter:
>
> snip ...

I am having a problem with the above statement, in particular the part
"although the current dir is also always searched".  To source a script
you can use one of two builtins, "." or "source". According to the man
page, for the "." builtin:

"Files in the current directory are not read unless `.' appears somewhere
in $path."

For the "source" builtin:

"Same as `.', except that the current directory is always searched and is
always searched first, before directories in $path."

As all examples in this email thread were using the "." builtin the above
statement didn't make sense to me. To be honest, until I reread the man
page, I always thought that both builtins were doing the same identical
thing. Learned "my" something new for today.

Hopefully I did not misreading what you were trying to state.

Jim

  reply	other threads:[~2017-08-20 10:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 21:46 PATH_DIRS Ray Andrews
2017-08-10 22:19 ` PATH_DIRS Bart Schaefer
2017-08-11  5:07   ` PATH_DIRS Ray Andrews
2017-08-11 16:12     ` PATH_DIRS Ray Andrews
2017-08-14  3:20     ` PATH_DIRS Bart Schaefer
2017-08-15  3:53       ` PATH_DIRS Ray Andrews
2017-08-15 16:50         ` PATH_DIRS Jim
2017-08-15 17:32           ` PATH_DIRS Bart Schaefer
2017-08-16 16:22             ` PATH_DIRS Ray Andrews
2017-08-20 10:59               ` Jim [this message]
2017-08-20 16:50                 ` PATH_DIRS Ray Andrews
     [not found]         ` <CA+rB6GL7tv+_tyswyZYFLksy_+oQ4Nk8ZQ9FRDW8h1dfnKdUgw@mail.gmail.com>
2017-08-16 14:45           ` PATH_DIRS Ray Andrews

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='CA+rB6G+vCPW2=jYBix-cvAhHAD5e2H25ffY5mpobrMfDsZjx0A@mail.gmail.com' \
    --to=linux.tech.guy@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-users@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).