昨天是寫了些 c program, 沒有更改設定, 今天早上開機之後, terminal 的 prompt
[localhost:~] myname%
變成
[:~] myname%
如何把他復原, 或是改成別的名字呢?
Thanks!
Localhost 不見了...
版主: ross_tt、bryanchang、digdog、chester
Localhost 不見了...
In C shell, the variable "prompt" stores the style of shell prompt. Change it by
set prompt="something"
The default value is
set prompt="[%m:%c3] %n%#"
where %m stands for your machine name, %c3 is the truncated current working directory, %n is the username. I don't know what %# is for. [img]images/smiles/icon_smile.gif[/img] On my computer it looks like:
[dhcpa4:~] scm%
In ordinary UNIXes you would put the above "set prompt=..." command in a file called .cshrc so it is executed each time you enter the shell. In OS X they have altered the mechanism a bit and I do not have the info at hand... anyone?
Hope that helps. [img]images/smiles/icon_smile.gif[/img]
set prompt="something"
The default value is
set prompt="[%m:%c3] %n%#"
where %m stands for your machine name, %c3 is the truncated current working directory, %n is the username. I don't know what %# is for. [img]images/smiles/icon_smile.gif[/img] On my computer it looks like:
[dhcpa4:~] scm%
In ordinary UNIXes you would put the above "set prompt=..." command in a file called .cshrc so it is executed each time you enter the shell. In OS X they have altered the mechanism a bit and I do not have the info at hand... anyone?
Hope that helps. [img]images/smiles/icon_smile.gif[/img]