contrib/completion/git-completion.bash: declare -g is not portable
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Feb 3, 2018, 17:20 UTC
- Message-ID
- <1e618c0c-81ba-fa7e-8039-748bdfa5a6d9@web.de>
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] ...] --- expected 2018-02-03 17:10:18.000000000 +0000 +++ out 2018-02-03 17:10:18.000000000 +0000
@@ -1,15 +1,2 @@ ---quiet ---detach ---track ---orphan= ---ours ---theirs ---merge ---conflict= ---patch ---ignore-skip-worktree-bits ---ignore-other-worktrees ---recurse-submodules ---progress --no-track --no-recurse-submodules not ok 92 - double dash "git checkout" What is "declare -g" good for ? <https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#index-declare>