Re: Standard .bashrc needs a minor fix

2010-05-10 Thread Greg Wooledge
On Sat, May 08, 2010 at 08:42:02AM -0800, Ken Irving wrote: > bash(1) (v4.1) includes: > > OPTIONS > ... > -iIf the -i option is present, the shell is interactive. > > and > > INVOCATION > ... > PS1 is set and $- includes i if bash is interactive,

Re: Standard .bashrc needs a minor fix

2010-05-08 Thread Ken Irving
On Fri, May 07, 2010 at 03:03:57PM -0400, Mike Frysinger wrote: > On Friday 07 May 2010 08:49:26 Greg Wooledge wrote: > > On Thu, May 06, 2010 at 09:30:20AM -0500, Chuck Remes wrote: > > > e.g. > > > [ -z "$PS1" ] && return > > > > That's certainly *not* how I'd write that check. If the goal is t

Re: Standard .bashrc needs a minor fix

2010-05-08 Thread Joachim Schmitz
Greg Wooledge wrote: On Thu, May 06, 2010 at 09:30:20AM -0500, Chuck Remes wrote: The standard .bashrc contains a line of code that precludes certain scripts from executing. It has to do with the logic for checking if the session is interactive. There's no such thing as a "standard .bashrc",

Re: Standard .bashrc needs a minor fix

2010-05-07 Thread Mike Frysinger
On Friday 07 May 2010 08:49:26 Greg Wooledge wrote: > On Thu, May 06, 2010 at 09:30:20AM -0500, Chuck Remes wrote: > > e.g. > > [ -z "$PS1" ] && return > > That's certainly *not* how I'd write that check. If the goal is to > protect a block of commands from running when the shell is invoked > wit

Re: Standard .bashrc needs a minor fix

2010-05-07 Thread Greg Wooledge
On Thu, May 06, 2010 at 09:30:20AM -0500, Chuck Remes wrote: > The standard .bashrc contains a line of code that precludes certain scripts > from executing. It has to do with > the logic for checking if the session is interactive. There's no such thing as a "standard .bashrc", at least not from

Re: Standard .bashrc needs a minor fix

2010-05-06 Thread Bob Proulx
Chuck Remes wrote: > The standard .bashrc contains a line of code that precludes certain > scripts from executing. It has to do with the logic for checking if > the session is interactive. > > e.g. > [ -z "$PS1" ] && return > > Usually a few other lines are included afterward to, for example, > ali

Re: Standard .bashrc needs a minor fix

2010-05-06 Thread Bob Proulx
Chuck Remes wrote: > Some scripts like rvm (rvm.beginrescueend.com) need to run at the > tail end of the login process to tack on more data to PATH or set > other environment variables (think of it as a post-login > hook). These kinds of scripts fail to execute with the code above. Thank you for t

Standard .bashrc needs a minor fix

2010-05-06 Thread Chuck Remes
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/local