From: Piers Powlesland <pierspowlesland@gmail.com>
To: zsh-workers@zsh.org
Subject: BUG: AUTO_CD is not respecting binaries in PATH
Date: Fri, 12 Apr 2019 17:54:35 +0100 [thread overview]
Message-ID: <CAFXacXkexbTc0A=H51=MqANRr5f=aV1VKq-oVnvPEuvkQJhEHg@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2019-04-12 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 16:54 Piers Powlesland [this message]
2019-04-12 18:49 ` dana
2019-04-12 19:21 ` Piers Powlesland
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='CAFXacXkexbTc0A=H51=MqANRr5f=aV1VKq-oVnvPEuvkQJhEHg@mail.gmail.com' \
--to=pierspowlesland@gmail.com \
--cc=zsh-workers@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).