What would be the proper way to alias cd so that you not only change
directories but you get an ls -F as well? It is rare that I cd without ls
being the next command.
alias cl='cd $1;ls -F'
i didn't know if $1 works with aliases as with functions.
still don't know:)
[user /path]$ cl newdir
...listed the new dir, but strangely didn't cd there.
alias eko='echo $1'
eko blabla actually echoes blabla.
but why doesn't cl cd?
> What would be the proper way to alias cd so that you not only change
> directories but you get an ls -F as well? It is rare that I cd without ls
> being the next command.
... ak42 at kurir dot net ...
God is real, unless declared integer
from the manpage:Quote:> Thanks, that works nicely.
> Any chance of getting an explanation as to why it works?
alias [ name [ def ] ]
alias assigns def to the alias name. def is a list of words
that may contain escaped history-substitution metasyntax.
i have a quick question:
is there a way i can alias the "cd" command to do an ls every time i do
a "cd" ?
i guess this has something to do with backticks. simply doing alias cd
`cd; ls` isn't working (obviously because i have to "pass in" the
directory i type after cd into the backticked cd command and then do