Zsh alias does not work like in bash

I use this alias in my own .bashrcbut it doesn't seem to work in zshusing .zshrc. The other aliases that I use work fine, so I know that I .zshrcuse other aliases.

alias rubydev3="cd ~/code/ruby/rails/rails3projects/"

This error message is:

cd:cd:10: no such file or directory: /home/jryan/code/ruby/rails/rails3tutorial/

I don't know if cd:cd:10something means that should be the key, but I'm just starting to use it zsh, so I'm not okay. If the command should work as it is in this post, I am sure that it probably has something to do with the conflict of another configuration file or something like that.

+3
source share
3 answers

:

function rubydev3 {
    builtin cd ~/code/ruby/rails/rails3projects/
}
+1

~/.zshrc? , , . :

type -a rubydev3

, "rubydev3".

, .

, , cd . , :

alias rubydev3="builtin cd ~/code/ruby/rails/rails3projects/"
0

Inclusion - do you use rvm? This adds functionality to cd, try disabling it.

export rvm_project_rvmrc=0
0
source

Source: https://habr.com/ru/post/1758939/


All Articles