If I define an alias like this in .bashrc:
alias cd="cd $1 && ls"
If I call:
cd test
It correctly shows file in test directory but no changes the current directory.
If I define a function in .bashrc:
function cd {
cd "$1" && ls
}
Now if i call
cd test
It correctly shows file in test directory and changes the current directory to "test".
Anyone knows what is the difference?