zsh-workers
 help / Atom feed
* BUG: AUTO_CD is not respecting binaries in PATH
@ 2019-04-12 16:54 Piers Powlesland
  2019-04-12 18:49 ` dana
  0 siblings, 1 reply; 3+ messages in thread
From: Piers Powlesland @ 2019-04-12 16:54 UTC (permalink / raw)
  To: zsh-workers

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

With AUTO_CD set and I enter a binary name that is available on my PATH but
there is a subdirectory of the same name, then zsh cds into that directory
when instead it should exectue the binary of the same name.

E.G.

[17:44]piers@laptop:~/projects
$ mkdir zsh
[17:45]piers@laptop:~/projects
$ zsh
[17:45]piers@laptop:~/projects/zsh
$ which zsh
/usr/bin/zsh
[17:45]piers@laptop:~/projects/zsh
$ echo $PATH
/home/piers/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

According to the docs this is not the correct behaviour, sine these are
commands that can be executed.

>If a command is issued that can't be executed as a normal command, and the
>command is the name of a directory, perform the cd command to that
directory.
>This option is only applicable if the option SHIN_STDIN is set, i.e. if
>commands are being read from standard input.  The option is designed for
>interactive use; it is recommended that cd be used explicitly in scripts to
>avoid ambiguity.


I'm running:

zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

with kernel:

4.19.14-041914-generic

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG: AUTO_CD is not respecting binaries in PATH
  2019-04-12 16:54 BUG: AUTO_CD is not respecting binaries in PATH Piers Powlesland
@ 2019-04-12 18:49 ` dana
  2019-04-12 19:21   ` Piers Powlesland
  0 siblings, 1 reply; 3+ messages in thread
From: dana @ 2019-04-12 18:49 UTC (permalink / raw)
  To: Piers Powlesland; +Cc: zsh-workers

On 12 Apr 2019, at 11:54, Piers Powlesland <pierspowlesland@gmail.com> wrote:
>With AUTO_CD set and I enter a binary name that is available on my PATH but
>there is a subdirectory of the same name, then zsh cds into that directory
>when instead it should exectue the binary of the same name....
>
>zsh 5.4.2 (x86_64-ubuntu-linux-gnu)

Not sure when or where, but i think this is fixed? I can replicate on Ubuntu's
5.4.2, but not on 5.7 on either Ubuntu or macOS

dana


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG: AUTO_CD is not respecting binaries in PATH
  2019-04-12 18:49 ` dana
@ 2019-04-12 19:21   ` Piers Powlesland
  0 siblings, 0 replies; 3+ messages in thread
From: Piers Powlesland @ 2019-04-12 19:21 UTC (permalink / raw)
  To: dana; +Cc: zsh-workers

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

I will look in to upgrading, thanks.

On Fri, Apr 12, 2019 at 7:49 PM dana <dana@dana.is> wrote:

> On 12 Apr 2019, at 11:54, Piers Powlesland <pierspowlesland@gmail.com>
> wrote:
> >With AUTO_CD set and I enter a binary name that is available on my PATH
> but
> >there is a subdirectory of the same name, then zsh cds into that directory
> >when instead it should exectue the binary of the same name....
> >
> >zsh 5.4.2 (x86_64-ubuntu-linux-gnu)
>
> Not sure when or where, but i think this is fixed? I can replicate on
> Ubuntu's
> 5.4.2, but not on 5.7 on either Ubuntu or macOS
>
> dana
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 16:54 BUG: AUTO_CD is not respecting binaries in PATH Piers Powlesland
2019-04-12 18:49 ` dana
2019-04-12 19:21   ` Piers Powlesland

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox