Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 3/4] _git: fix __git_submodules to only use the actual name of the submodule
- X-seq: zsh-workers 32397
- From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- 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
- Cc: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NnCwhf6zRYaZV33lxEVUREYq7Dl3L9UHRnRtR9/t+yM=; b=PRTkp+WLzDIQqJ44432XGV8z+HNYuMMmG74hHcyOqr2IILbdxOYZryB/KiazDQ4s75 mIpDE7tKR8f5Y9Ym0hAN/ks9hwwYxJRUo5/NUjKZPyXu7S3/Z9GKyORMHwhLzC9/eLRY JpbR793DZSaSmVbPdYxWOkp4wdxsGQrEalVCWxjp1cUSd98zaKOjlKUbvdY9W61gWAEB uk/nXDcX1BEdaTk5tfl+e0dfYx6KFcQzni2jlCQGzelFPUiMC23n/sMFsUdld4Wod+Fo NtvEkMHqgEjapFhU1R3YIzjaJoQzjgWBtk21DRw0/KRUdV54H8v4KtXc4Oe2ALVAxyQH nCkA==
- In-reply-to: <1392609639-2916-1-git-send-email-m0viefreak.cm@googlemail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author