help with using alias in bash shell

Posted by ajsie on Stack Overflow See other posts from Stack Overflow or by ajsie
Published on 2010-04-03T16:56:02Z Indexed on 2010/04/03 17:03 UTC
Read the original article Hit count: 213

Filed under:

i want to have an alias "t" to enter a folder and list the content there.

i tried with:

alias t="cd $1; ls -la"

but it just listed the folder i typed but did not enter it. i wonder why?

cause when i use this one:

alias b="cd ..; ls"

it went back to the parent and listed the content.

so i want the "t" do enter the folder i type in too.

someone knows how to do this right?

© Stack Overflow or respective owner

Related posts about bash