Hi Friend,
If it is high end switch hving CATOS like 4k,5k or 6k switch then the command will be "set prompt "
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/sw_8_5/cmd_ref/set_po_r.htm#wp1026610
You can use "set system name " command to assign a name to the switch.
For an catlst IOS base switch the command to configure the system name for the switch is "hostname " on global config mode and to configure system prompt command will be "prompt " on global config mode.
Have a look at this link
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12120ea2/2950scg/swadmin.htm#wp1051875
HTH, if yes please rate the post.
Ankur