Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: command cd doesn't work on some builds of zsh



On Tue, Feb 13, 2024 at 03:24:22PM +0530, Ajeet D'Souza wrote:
> Hi, I found inconsistent behaviour of the command builtin in some builds on
> zsh.
> 
> On Fedora 39:
> *$ zsh --version*
> zsh 5.9 (x86_64-redhat-linux-gnu)
> *$ zsh -c 'command cd'*
> 
> On Debian 10:
> *$ zsh --version*
> zsh 5.9 (x86_64-unknown-linux-gnu)
> *$ zsh -c 'command cd'*
> zsh:1: command not found: cd
> 
> According to the manual, command cd should work:
> 
> > Run command with args suppressing the normal shell function lookup. *Only
> > builtin commands* or commands found in the PATH are executed.
> 
> 
> Any idea why different builds on zsh produce different outcomes here?

Is there in fact an external cd command on the Fedora system?  Is the
POSIX_BUILTINS zsh shell option set by default on the Fedora system?

-- 
Andreas (Kusalananda) Kähäri
Uppsala, Sweden

.




Messages sorted by: Reverse Date, Date, Thread, Author