Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
BUG: AUTO_CD is not respecting binaries in PATH
- X-seq: zsh-workers 44221
- From: Piers Powlesland <pierspowlesland@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: BUG: AUTO_CD is not respecting binaries in PATH
- Date: Fri, 12 Apr 2019 17:54:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=q3TqcQbqj7z9snQ6hep+WO0b92pFmUqdXHjxoSEk6jw=; b=VwZgG1RucIzM3u5R68WMu0RpSm09Nu4LuSpmmIViDXpSFOaYbOQYNUGnK9RmyyV4W6 fc1yEHvUgK4izNEmoC0uY0T8wa4wdZDn9kSBHTu0rRX6MUsF9OWnsNs/V8zODtwLqBHA 3hzMBc4HmrCXB0DePdApGiQUHgTV1zma147jzEwpHhJBnO9MgRZnIox7km78BmCehwQM CiQZwD+0+9zBUa0ebW2xBJwO6XSvUtuypnLZTWH0yS9yCUcuXxhR/jrkLVZl9vGzKcR4 gdDW5qzbuoX4mTq5AHa1dJLJuKlL5r2696auTkoHG9W/mzRdccGV+lFzHZ7qQu6Ru/af XHEg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author