ok all you linux and unix experts!
i got a bit of a question for you.
in class, we're using alot of Unix stuff. we're using SSH Secure Shell client to connect to the school's unix machines (dunx1 and tux). I've changed my shell over from c-shell to BASH. after getting bored of the default BASH prompt, i changed it.
in order to do so, (and keep the change for each session) i created a file in myhome directory called .bash_profile and placed the following line in it:
PS1="(\#)[\h:\W]touch me$ "
what that does is it makes my prompt tell me the # of commands i've executed so far, the name of the machine i'm on, and the directory i'm in. it works beautifully.
here's where my problem appears. whenever i cd to a new directory, i always type "ls -lah" to list what's in it. to save time and because i was bored, i decided to make that into a shell function. now, my .bash_profile reads:
PS1="(\#)[\h:\W]touch me$ "
function cdsee(){ cd $1; ls -lah;}
however, my prompt is now being displayed AFTER everything i do. and the cursor is in front of it, so i end up typeing over my prompt. example:
(2)[dunx1:aea56]touch me$ _ <--normal, i'd start typing at the _
(7)[dunx1:aea56]touch me$ <---now, again, i type at the _ but this time it's on top of the prompt
there is no reason i can see that would cause this, so i'm hoping that one of you might have some sort of hidden technique up your sleeves that can help. thanks guys!