Is there an environment variable in CSH to change the PS2
like in bash
and sh
?
For example:
$PS2 = "hi"
I tried it but it doesn't work in csh
.
Is there an environment variable in CSH to change the PS2
like in bash
and sh
?
For example:
$PS2 = "hi"
I tried it but it doesn't work in csh
.
I'm going to assume you're using tcsh
, which has prompt2
(not available in the original csh
, AFAIK almost all of all versions of csh
are tcsh
these days).
From the manpage, section "Special shell variables":
prompt2 (+)
The string with which to prompt in while and foreach loops and after lines ending in\'. The same format sequences may be used as in prompt (q.v.); note the variable meaning of
%R'. Set by default to `%R? ' in interactive shells.
It's not an environment variable, you can just use set
:
% set prompt2 = 'x> '
% while 1
x>