[PATCH] completion: recognize "--local" as a config file source
- From
Jeff King <peff@peff.net>
- Date
- Feb 12, 2013, 05:49 UTC
- Message-ID
- <20130212054922.GA20129@sigill.intra.peff.net>
- In-Reply-To
- <20130211210455.GB32740@sigill.intra.peff.net>
When we are trying to show the list of config variables in a file, we recognize "--system", "--global", and "--file" as specifying a particular file. This list misses "--local", which performs a similar function.
Without this patch, completing:
git config --get --local
shows items from all config files, not just the local one.
Noticed-by: Dasa Paddock <dpaddock@esri.com> Signed-off-by: Jeff King <peff@peff.net> --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c8452fb..0b7b659 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1779,7 +1779,7 @@ __git_config_get_set_variables () while [ $c -gt 1 ]; do word="${words[c]}" case "$word" in - --global|--system|--file=*) + --global|--system|--local|--file=*) config_file="$word" break ;;
-- 1.8.1.2.11.g1a2f572