From: m0viefreak <m0viefreak.cm@googlemail.com>
To: zsh-workers@zsh.org
Cc: m0viefreak <m0viefreak.cm@googlemail.com>
Subject: [PATCH 3/4] _git: fix __git_submodules to only use the actual name of the submodule
Date: Mon, 17 Feb 2014 05:00:38 +0100 [thread overview]
Message-ID: <1392609639-2916-4-git-send-email-m0viefreak.cm@googlemail.com> (raw)
In-Reply-To: <1392609639-2916-1-git-send-email-m0viefreak.cm@googlemail.com>
The output of 'submodule status' is
Xsha1 name (describe)
X being one of -,+,U,[space]
We are only interested in the name part and not the whole line.
Fix the parameter expansions accordingly.
---
Completion/Unix/Command/_git | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 8105501..40a86bf 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5546,7 +5546,7 @@ __git_submodules () {
local expl
declare -a submodules
- submodules=(${${(f)"$(_call_program submodules git submodule 2>/dev/null)"}#* })
+ submodules=(${${${(f)"$(_call_program submodules git submodule 2>/dev/null)"}#?* }%% *})
__git_command_successful $pipestatus || return 1
_wanted submodules expl submodule compadd $* - $submodules
--
1.9.0.1.g7244ca4
next prev parent reply other threads:[~2014-02-17 4:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 4:00 [PATCH 0/4] _git: bugfixes, improvements and updates m0viefreak
2014-02-17 4:00 ` [PATCH 1/4] _git: fix __git_committish_range_{first,last} and __git_is_committish_range m0viefreak
2014-02-17 4:00 ` [PATCH 2/4] _git: diff: refactor and fix wrong completions m0viefreak
2014-02-18 11:24 ` Frank Terbeck
2014-02-17 4:00 ` m0viefreak [this message]
2014-02-17 4:00 ` [PATCH 4/4] _git: completion updates up to latest git v1.9.0 m0viefreak
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=1392609639-2916-4-git-send-email-m0viefreak.cm@googlemail.com \
--to=m0viefreak.cm@googlemail.com \
--cc=zsh-workers@zsh.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).