在csh中是否有环境变量来修改PS2?
在CSH中是否有环境变量来改变PS2
就像在bash
和sh
?
例如:
$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>