I have a few aliases in .bash_aliases
. I defined c
alias as follows, but it does not work as it should:
...
alias cd='cd; ls -r --time=atime'
alias c='cd'
...
In .bashrc
there is a line:
alias ls='clear; ls --color=auto'
Commnand c
gives bad output now. It should give the same output as
cd; clear; ls -r --time=atime --color=auto
.
Other problem: When I type cd dir
I should stay in dir
but I'm in $HOME
as a result.
How can I solve this and improve in defining aliases? Is .bash_aliases
interpreted as a regular grammar
?