Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Greg Wooledge Newsgroups: gnu.bash.bug Subject: Re: declare -g reports as invalid option on MacOS (10.14.6) Bash (5.0.11) Date: Tue, 3 Sep 2019 09:03:20 -0400 Lines: 21 Approved: bug-bash@gnu.org Message-ID: References: <14820bd504a5fa7745aa83f4db7d5829e880675f.camel@sutton-family.net> <20190903130320.GR6166@eeg.ccf.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1567515833 11438 209.51.188.17 (3 Sep 2019 13:03:53 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Ray Sutton Envelope-to: bug-bash@gnu.org Mail-Followup-To: Ray Sutton , bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <14820bd504a5fa7745aa83f4db7d5829e880675f.camel@sutton-family.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 139.137.100.1 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20190903130320.GR6166@eeg.ccf.org> X-Mailman-Original-References: <14820bd504a5fa7745aa83f4db7d5829e880675f.camel@sutton-family.net> Xref: csiph.com gnu.bash.bug:15347 On Fri, Aug 30, 2019 at 06:03:37PM -0600, Ray Sutton wrote: > The issue is on a late 2013 MBP running MacOS 10.14.6 and > bash -version reports 5.0.11(1)-release (x86-64-apple-darwin18.6.0) > > The error is occuring in my .bash_profile and reports as > > -bash: declare: -g: invalid option You probably have multiple versions of bash installed. One of them, which you invoked by typing "bash -version" from a command shell, is version 5.0.11. The other, which is your login shell as used by your terminal emulator, is very likely bash 3.2. > The behavior seems consistent with the original bash 3 declare > statement persisting after the bash 5 install which seems unlikely. Yup. Your login shell is still pointing to the original bash, not the other bash.