1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: newline in IOCSH_PS1 value |
From: | Mark Davis <[email protected]> |
To: | [email protected], Eric Norum <[email protected]> |
Date: | Thu, 27 Feb 2014 13:42:57 -0500 |
I was starting to come to the same
conclusion: That there was something fundamentally wrong in some
basic assumption I was making that I didn't even know I was making
it.
The culprit turned out to be the sudo command. Experimenting with the various nested scripts we use to launch the IOC shell, I found that, indeed, setting the IOCSH_PS1 value in any one of them worked just fine, so it had to be something about how I was launching the outermost one, since it was completely ignoring the value I set in my login shell. The problem turned out to be that I was launching the scripts using sudo, and the default behavior for sudo is to NOT execute commands using your existing environment. This make sense from a security standpoint, but I had somehow never run in to the issue before or given it any thought. To pass my test the way I was doing it, all I needed was to use the -E option on the sudo command. Of course, that was only for testing. For normal use, I will have one of the scripts set the value. But at least now I know about this (perfectly sensible) behavior and (hopefully) won't bang my head on that particular wall again. I never know what new tidbit I am going to learn when I launch in to one of these "quick" projects (I mean, really, all I wanted to do was change the shell prompt! How hard could THAT be? ARRrrgggghhhhhh!) Anyway, thanks for your help, and in helping to get me pointed in the right direction. Mark Davis On 2/27/2014 11:25 AM, Eric Norum wrote: You’re trying this on linux? |