$ echo ${(t)prompt}
scalar-special
$ echo ${(t)PROMPT}
scalar-special
Zsh shows that they are special, but does not show that they are tied like:
$ echo ${(t)manpath}
array-tied-special
$ echo ${(t)MANPATH}
scalar-tied-export-special
From the man page:
PROMPT <S> <Z>
Same as PS1 ...
prompt <S> <Z>
Same as PS1.
This means that if you modify one of PROMPT
, prompt
or PS1
, and then look at one of the other two variables, you will see that your modifications are there as well.
PROMPT=foo
echo $PS1 # outputs foo
echo $prompt # outputs foo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.