Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _git-config: Complete unknown options from 'git help -c'.
- X-seq: zsh-workers 44797
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _git-config: Complete unknown options from 'git help -c'.
- Date: Mon, 30 Sep 2019 16:51:11 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=from:to:subject:date:message-id; s=fm1; bh=fPO4WqqOZsDc4yL6b0ggvn8h+OK5rU1q0vri1d7vXbw=; b=BZpdsQupDsGG zTz0oeyR6jHVJ2/ixWMGNdwOf/RCzXbavhkUl11N1UsBL0w+0E2J/KRosGPfJV9Q UPF62QHMFqyRLO4sxn0pMOHDI6BQhr1olzJKIp02RdxGcT7K6wEp79pc5eTnbbko Ze7g0e92YrN0TcmenZ616aMGLXlhIzQytr5wDLgFXa2sdth3sdMeZ6EI5w/X4a4R xOnSBWZ/ZH91mQHQVOQ+J86ThtOmwfogq9BLsBRbMpdnAThF8rwFd6QpUTl8Jeby FnpHTZKNGcjDCjvhxdcqQhWPzkMFj86rOmCtCNYgbBUnmxaYNtfpBI0YyVrOpi43 v9Idkg27pA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=fPO4WqqOZsDc4yL6b0ggvn8h+OK5rU1q0vri1d7vXbw=; b=sPYn4Buu yBXhB+WJlc6rRuPksrJiXTWlEcEwGyxqJ77CAoegaoDUBlKUYz9tadg8sWR/HosM GpegoyGr/9qsH32/q+UfVxVywtyXiC+NWte0Xj1R71kzYVZEGevMaENOTQD0EPXP gb9KRiaX79ZYWBJo592P2xt/LeZy8QOl5rn/tqscJWD52iu2bvs6nIognCT3z6Aa j9yRUt2TNUlh30Zfqik+WhOa8Byfd2kyW768VbKGfUIkEosfM3nrdstUXSKO3y/c xDA22XuRtipVxUR7iv8/SyDV3h9nyHr1e3M6SjRGsp2sCHaRsolYrpUMQ7LN9fWk Up7McWRWthFuTw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
Completion/Unix/Command/_git | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 29fa379a7..873b13e5b 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2886,9 +2886,16 @@ __git_config_option-or-value () {
declare -a git_present_options # 'present' is an adjective
git_present_options=(
${${${(0)"$(_call_program gettable-options git config -z --list)"}%%$'\n'*}//:/\\:}
+
+ # Remove the "'git help config' for more information" line.
+ #
+ # Change literal 'foo.<bar>.baz' to 'foo.*.baz'. With that, completing
+ # at foo.lorem.<TAB> will offer foo.lorem.baz.
+ ${${${(f)"$(_call_program all-known-options "git help -c")"}:#* *}/<*>/*}
)
- # Add to $git_options options from the config file that aren't already in $git_options.
+ # Add to $git_options options from the config file, and from 'git help -c',
+ # that aren't already in $git_options.
() {
local -a -U sections_that_permit_arbitrary_subsection_names=(
alias
Messages sorted by:
Reverse Date,
Date,
Thread,
Author