git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: contrib/completion/git-completion.bash: declare -g is not portable
Date: Sat, 03 Feb 2018 20:51:16 +0100	[thread overview]
Message-ID: <87lgg9g8cr.fsf@linux-m68k.org> (raw)
In-Reply-To: <1e618c0c-81ba-fa7e-8039-748bdfa5a6d9@web.de> ("Torsten Bögershausen"'s message of "Sat, 3 Feb 2018 18:20:18 +0100")

On Feb 03 2018, Torsten Bögershausen <tboegi@web.de> wrote:

> What is "declare -g" good for ?

      -g        create 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 `-g' option suppresses this behavior.
    
Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2018-02-03 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-03 17:20 contrib/completion/git-completion.bash: declare -g is not portable Torsten Bögershausen
2018-02-03 19:51 ` Andreas Schwab [this message]
2018-02-03 20:22   ` Jeff King
2018-02-04  9:45 ` Duy Nguyen
2018-02-04  9:57   ` Eric Sunshine
2018-02-04 11:48     ` Lucas Werkmeister

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgg9g8cr.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).