From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: "SZEDER Gábor" <szeder@ira.uka.de>,
"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: [PATCH] completion: simplify __git_complete_revlist_file
Date: Tue, 1 May 2012 20:42:56 +0200 [thread overview]
Message-ID: <1335897776-3726-1-git-send-email-felipe.contreras@gmail.com> (raw)
Use new __gitcomp_nl; this is the last place that uses COMPREPLY and
compgen directly.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
contrib/completion/git-completion.bash | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 31f714d..d877a23 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -676,9 +676,7 @@ __git_complete_revlist_file ()
*) pfx="$ref:$pfx" ;;
esac
- local IFS=$'\n'
- COMPREPLY=($(compgen -P "$pfx" \
- -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
+ __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
| sed '/^100... blob /{
s,^.* ,,
s,$, ,
@@ -692,7 +690,7 @@ __git_complete_revlist_file ()
s,$,/,
}
s/^.* //')" \
- -- "$cur_"))
+ "$pfx" "$cur_" ""
;;
*...*)
pfx="${cur_%...*}..."
--
1.7.10
next reply other threads:[~2012-05-01 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 18:42 Felipe Contreras [this message]
2012-05-01 23:39 ` [PATCH] completion: simplify __git_complete_revlist_file Junio C Hamano
2012-05-01 23:46 ` Felipe Contreras
2012-05-05 15:19 ` Felipe Contreras
2012-05-05 22:40 ` SZEDER Gábor
2012-05-07 17:15 ` Junio C Hamano
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=1335897776-3726-1-git-send-email-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=szeder@ira.uka.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).