the name on my terminal changed from BuDop's MBP:~ budop$ to dhcp-v06:~ budop$ after I set up a local server using nodejs.
This was was I did prior to the change:
I installed a middleware framework for node
npm install connect
created a server file called server.js
ran the node server
When I quit out of the server, I noticed that my terminal name has change. I am pretty new unix user and can't figure why my terminal name has changed.
@Perderabo: thanks for the reply. I am using bash. I have a .bash_profile file. Do I put the function in there? I haven't done much in that file because I am relatively new to unix and worried that I may make some damage that I can't fix.
As a new unix user, I am curious/concerned with changes that I don't explicitly made myself.
.bash_profile is certainly an option. You could just type those lines in at your prompt (or cut and paste). Or you can put them in a file called "anything" and then type source anything to read them in.
No matter what directory I am in, the the name dhcp-v062-202:~ budop$ remains. The name of my computer use to reside where dhccp is...so it used to be BuDops-mbp:~ budop$, now it is dhcp-v062-202:~ budop$.
BuDop
---------- Post updated at 04:49 PM ---------- Previous update was at 04:45 PM ----------
Perderabo,
just curious as what this line of code mean "\\033]0;$*\\007\\c".
The "$" in the middle will expand to the arguments you passed to the function. So if I type "retitle my new name", the $ will be replaced with "my new name". The characters in front and in back of the $* are just the escape sequence that instructs the software to retitle its window. There are escape sequences to lots of other stuff like clear the screen, change colors, move the cursor around, etc.