Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__zsh_like_cd not found #4374

Open
ORESoftware opened this issue May 2, 2018 · 1 comment
Open

__zsh_like_cd not found #4374

ORESoftware opened this issue May 2, 2018 · 1 comment

Comments

@ORESoftware
Copy link

This issue relates to:
#4373

I am overriding cd like so:

    local dr=$(declare -f cd);

    if [[ "$dr" != *"run_botch"* ]]; then
        definition_prev_cd="prev_$dr"
        echo "$definition_prev_cd";
        eval "${definition_prev_cd}"
        unset definition_prev_cd  # clean up, no reason to leave this string around
        export -f prev_cd
        return 1;
    fi

it works until I use a subshell, and then I get:

__zsh_like_cd: command not found

maybe you can export __zsh_like_cd, with

export -f __zsh_like_cd
?

@RoUS
Copy link

RoUS commented Jun 11, 2019

I have cd defined as a bash function. That causes this error. If I unset my definition, the problem (at least as demonstrated by rvm install ...) goes away.

This is

  1. A violation of the Principle of Least Astonishment,
  2. An unwarranted assumption of initial conditions, and
  3. Interference with the user's preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants