You’re trying this on linux? I just tried: makeBaseApp.pl -t example example makeBaseApp.pl -t example -i example ../../bin/linux-x86_64/example st.cmd export IOCSH_PS1=“FOO BAR> " ../../bin/linux-x86_64/example st.cmd and got. . . ## Start any sequence programs #seq sncExample, "user=enorumHost" FOO BAR>
I didn’t type anything fancy on the export line — just a <return>.
I then added this line to the startup script: epicsEnvSet IOCSH_PS1 "$(PROMPT)"
export PROMPT="ONE LINER> " ../../bin/linux-x86_64/example st.cmd . . . ## Start any sequence programs #seq sncExample, "user=enorumHost" ONE LINER>
export PROMPT="TWO > LINER> " ../../bin/linux-x86_64/example st.cmd . . . ## Start any sequence programs #seq sncExample, "user=enorumHost" TWO LINER>
The fact that you get a complaint about PROMPT being undefined makes me think that there’s something weird with your linux shell — that it’s not actually passing on the environment properly.
Don't know why it doesn't work for for
me.
I tried this first just using the name IOCSH_PS1 for my bash
environment variable, which didn't work.
Figuring that the IOCSH_PS1 value might get some special
treatment, or that something in the scripts we use to lauch the
IOC shell are doing something of their own, I tried this:
___________________________________________
In my bash shell, before launching the IOC shell:
davis-pc:/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib>
export PROMPT=$'\nmdlinux> '
OR
davis-pc:/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib>
export PROMPT=" <--- typed Ctl+V, Ctl+J
mdlinux> "
___________________________________________
Both of which produce the same effect:
davis-pc:/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib>
env
...
PROMPT=
mdlinux>
...
OR
davis-pc:/home/epics/R3.14.12.2/apps/mdlinux/iocBoot/iocFrib>
set | grep PROMPT
PROMPT=$'\nmdlinux> '
___________________________________________
In the st.cmd file:
epicsEnvSet("IOCSH_PS1", "$(PROMPT)")
which produces the error:
macLib: macro PROMPT is undefined (expanding string
epicsEnvSet("IOCSH_PS1", "$(PROMPT)"))
and I also tried:
epicsEnvSet IOCSH_PS1 $(PROMPT)
which produces the error:
macLib: macro PROMPT is undefined (expanding string epicsEnvSet
IOCSH_PS1 $(PROMPT))
___________________________________________
Is there something special you have to do to get a particular bash
environment variable to show up in the EPICS IOC shell? If not,
what determines which ones show up and which ones don't?
Mark Davis
|