ajeetdsouza / zoxide

A smarter cd command. Supports all major shells.
MIT License
20.33k stars 519 forks source link

Using `cd` as --cmd argument results in infinite loop in bash #733

Closed hsanson closed 4 months ago

hsanson commented 4 months ago

When setting zoxide like below in bash seems to create an infinite loop:

eval "$(zoxide init --cmd cd bash)"

After the above setup running cd hangs the terminal for a while and then stops without moving to any folder.

This is on Kde Neon:

[~]$ lsb_release -a
No LSB modules are available.
Distributor ID: Neon
Description:    KDE neon 5.27
Release:        22.04
Codename:       jammy

With bash:

[~]$ bash --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
ajeetdsouza commented 4 months ago

Your version of zoxide is out of date, please update it (instructions in the README).