EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: newline in IOCSH_PS1 value
From: Eric Norum <[email protected]>
To: [email protected]
Cc: "[email protected]" <[email protected]>
Date: Thu, 27 Feb 2014 06:57:34 -0800
I see that I was in error -- it appears that it is only possible to have a newline in a prompt by passing it in as an environment variable from the shell.
But pickup up values from the environment has been a capability of the IOC shell for a long time.   I have many IOCs with startup scripts that set a value that can be overridden from the external environment.   For example:
epicsEnvSet("IM540_1_SERIAL","$(IM540_1_SERIAL=serialserver03:2001)")

On Feb 27, 2014, at 6:16 AM, Mark Davis <[email protected]> wrote:

I had tried the continued line approach (a '\' as the last character).  But all attempts to include a line break withing the string just results in an error:

##--- set IOC shell prompt ---
epicsEnvSet IOCSH_PS1, "\
st.cmd -- Line 200 -- Unbalanced quote.
mdlinux> "
st.cmd -- Line 201 -- Unbalanced quote.

I had not thought of setting a value before launching the IOC shell.  Unfortunately, it doesn't appear to pay any attention to the bash shell environment variables (excluding, of course, the standard ones the EPICS code itself requires, such as the EPICS_XXX ones, shown by the epicsParamShow command).

Now that I am looking for it, I am surprised that I have not been able to find even so much as a hint that commands in the IOC shell can make use of arbitrary environment variables that are set anywhere other than within the IOC shell itself (i.e. other than the special-case/standard ones).  I had assumed that this WAS possible, even if it required some command to do so.  But I have yet to find any command to due this, or any mention at all of some built-in way logic to support it).

Even more interesting is IOCSH_PS1 itself.  Although the epicsEnvSet command is used to set it, epicsEnvShow says it is NOT an environment variable:

epics> epicsEnvShow IOCSH_PS1
IOCSH_PS1 is not an environment variable.

(also not in the list shown if you just type epicsEnvShow)


Perhaps your examples require a newer version of EPICS?  (I am using R3.14.12.2)  But again, numerous Google searches have failed to turn up any document that mentions this one way or the other.


-- 
Eric Norum
[email protected]





References:
newline in IOCSH_PS1 value Mark Davis
Re: newline in IOCSH_PS1 value Eric Norum
Re: newline in IOCSH_PS1 value Mark Davis

Navigate by Date:
Prev: Re: newline in IOCSH_PS1 value Mark Davis
Next: RE: newline in IOCSH_PS1 value Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: newline in IOCSH_PS1 value Mark Davis
Next: Re: newline in IOCSH_PS1 value Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·