I'm adding a couple of aliases to my .bashrc file for some shortcuts I use often, among which are:
alias .="cd /;ls" alias ..="cd ../;ls" alias cd="cd $1;ls" alias ls="clear;pwd;ls"
The effective result being that whenever I navigate to a new directory, the window is cleared and displays the new directory and its contents at the top.
All of these aliases work except for the cd alias. I have tried multiple combinations of trying to cd in to the new directory and run ls there, but it seems like I can only either list the contents of the directory and return to the old directory, or successfully cd in to the directory but with the generated list being from the old directory.
Is there something special that needs to be done when aliasing cd (or any command with arguments) in bash? I feel like this is a relatively simple task but I'm just overlooking something with the syntax.