在csh中是否有环境变量来修改PS2?

在CSH中是否有环境变量来改变PS2就像在bashsh

例如:

 $PS2 = "hi" 

我试过但它在csh不起作用。

我将假设你正在使用tcsh ,它有prompt2 (在原始csh不可用,AFAIK几乎所有版本的csh都是tcsh这些天)。

从联机帮助页 , “特殊shell变量”部分

提示2(+)
用于提示输入while和foreach循环以及以\'. The same format sequences may be used as in prompt (qv); note the variable meaning of结尾的行之后的字符串\'. The same format sequences may be used as in prompt (qv); note the variable meaning of \'. The same format sequences may be used as in prompt (qv); note the variable meaning of \'. The same format sequences may be used as in prompt (qv); note the variable meaning of %R’ \'. The same format sequences may be used as in prompt (qv); note the variable meaning of 。 默认设置为’%R? ‘在交互式贝壳中。

它不是环境变量,你只需使用set

 % set prompt2 = 'x> ' % while 1 x> 
    Interesting Posts