Re: contrib/completion/git-completion.bash: declare -g is not portable

2018-02-04 Thread Lucas Werkmeister
On 04.02.2018 10:57, Eric Sunshine wrote: > On Sun, Feb 4, 2018 at 4:45 AM, Duy Nguyen wrote: >> On Sun, Feb 4, 2018 at 12:20 AM, Torsten Bögershausen wrote: >>> After running t9902-completion.sh on Mac OS I got a failure >>> in this style: >> >> Sorry I was new

Re: contrib/completion/git-completion.bash: declare -g is not portable

2018-02-04 Thread Eric Sunshine
On Sun, Feb 4, 2018 at 4:45 AM, Duy Nguyen wrote: > On Sun, Feb 4, 2018 at 12:20 AM, Torsten Bögershausen wrote: >> After running t9902-completion.sh on Mac OS I got a failure >> in this style: > > Sorry I was new with this bash thingy. Jeff already answered

Re: contrib/completion/git-completion.bash: declare -g is not portable

2018-02-04 Thread Duy Nguyen
On Sun, Feb 4, 2018 at 12:20 AM, Torsten Bögershausen wrote: > Hej Duy, > After running t9902-completion.sh on Mac OS I got a failure > in this style: Sorry I was new with this bash thingy. Jeff already answered this (and I will fix it in the re-roll) but just for my own

Re: contrib/completion/git-completion.bash: declare -g is not portable

2018-02-03 Thread Jeff King
On Sat, Feb 03, 2018 at 08:51:16PM +0100, Andreas Schwab wrote: > On Feb 03 2018, Torsten Bögershausen wrote: > > > What is "declare -g" good for ? > > -gcreate global variables when used in a shell function; > otherwise > ignored > > When

Re: contrib/completion/git-completion.bash: declare -g is not portable

2018-02-03 Thread Andreas Schwab
On Feb 03 2018, Torsten Bögershausen wrote: > What is "declare -g" good for ? -gcreate global variables when used in a shell function; otherwise ignored When used in a function, `declare' makes NAMEs local, as with the `local' command. The

contrib/completion/git-completion.bash: declare -g is not portable

2018-02-03 Thread Torsten Bögershausen
Hej Duy, After running t9902-completion.sh on Mac OS I got a failure in this style: .../projects/git/git.pu/t/../contrib/completion/git-completion.bash: line 300: declare: -g: invalid option declare: usage: declare [-afFirtx] [-p] [name[=value] ...] --- expected2018-02-03 17:10:18.0