From: Jonathan Nieder <jrnieder@gmail.com>
To: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
Junio C Hamano <junio@pobox.com>,
Stephen Boyd <bebarino@gmail.com>,
"Shawn O. Pearce" <spearce@spearce.org>,
git@vger.kernel.org
Subject: ks/precompute-completion
Date: Wed, 11 Nov 2009 16:08:32 -0600 [thread overview]
Message-ID: <20091111220832.GA31620@progeny.tock> (raw)
In-Reply-To: <fabb9a1e0911110957k599ac3dfmd1a44a0499c72b2d@mail.gmail.com>
Hi,
>> * ks/precompute-completion (2009-10-26) 3 commits.
>> (merged to 'next' on 2009-10-28 at cd5177f)
>> + completion: ignore custom merge strategies when pre-generating
>> (merged to 'next' on 2009-10-22 at f46a28a)
>> + bug: precomputed completion includes scripts sources
>> (merged to 'next' on 2009-10-14 at adf722a)
>> + Speedup bash completion loading
>>
>> What's the status of this thing? Last time I polled the list I had an
>> impression that it was not quite ready...
As a distro user, I don’t think I would be able to use it until there
is a command to update the installed completion, to call after adding
a new git command to my $PATH. This could mean:
- git-completion.bash.generate learns to read the .in file and
write the completion script to arbitrary paths (or just always
uses stdin and stdout?)
- distros install git-completion.bash.{generate,in} to /usr/share/git-core
- distros install a simple completion script to /etc/bash_completion.d
that passes the buck, e.g.
-- %< --
# bash completion support for core Git.
#
# Run update-git-completion to generate these files.
#
__git_user_completion=~/.cache/git-core/git-completion.bash
__git_system_completion=/var/cache/git-core/git-completion.bash
if test -r "$__git_user_completion"
then
. "$__git_user_completion"
elif test -r "$__git_system_completion"
then
. "$__git_system_completion"
fi
-- >% --
- new update-git-completion script, something like this:
-- %< --
#!/bin/sh
USAGE="update-git-completion {--system | --user | <filename>}"
datadir=/usr/share/git-core
die() {
echo >&2 "$*"
exit 1
}
if ! test $# -eq 1
then
die "usage: $USAGE"
fi
if test "$1" = "--system"
then
output=/var/cache/git-core/git-completion.bash
elif test "$1" = "--user"
then
output=$HOME/.cache/git-core/git-completion.bash
else
output=$1
fi
rm -f "$output+" || die "cannot remove $output+"
sh "$datadir"/git-completion.bash.generate \
< "$datadir"/git-completion.bash.in \
> "$output+" || die "failed to generate completion script"
bash -n "$output+" || {
rm -f "$output+"
die "generated script fails syntax check"
}
mv -f "$output+" "$output" || {
rm -f "$output+"
die "failed to install completion script"
}
-- >% --
Thoughts?
next prev parent reply other threads:[~2009-11-11 21:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 9:34 excerpts from tomorrow's "What's cooking" draft Junio C Hamano
2009-11-11 16:33 ` Ben Walton
2009-11-11 17:07 ` Johan Herland
2009-11-11 17:57 ` Sverre Rabbelier
2009-11-11 18:45 ` Daniel Barkalow
2009-11-15 2:07 ` Sverre Rabbelier
2009-11-15 2:49 ` Daniel Barkalow
2009-11-11 22:08 ` Jonathan Nieder [this message]
2009-11-13 6:40 ` ks/precompute-completion Stephen Boyd
2009-11-13 7:06 ` ks/precompute-completion Jonathan Nieder
2009-11-13 7:12 ` ks/precompute-completion Stephen Boyd
2009-11-13 8:50 ` [PATCH] Speed up bash completion loading Jonathan Nieder
2009-11-13 9:03 ` Jonathan Nieder
2009-11-13 10:29 ` Jonathan Nieder
2009-11-13 20:43 ` Stephen Boyd
2009-11-14 10:35 ` Jonathan Nieder
2009-11-14 11:01 ` Jonathan Nieder
2009-11-14 14:43 ` SZEDER Gábor
2009-11-14 19:33 ` Jonathan Nieder
2009-11-14 23:46 ` Stephen Boyd
2009-11-15 6:50 ` Jonathan Nieder
2009-11-15 9:05 ` Junio C Hamano
2009-11-15 10:29 ` [PATCH v2] " Jonathan Nieder
2009-11-16 1:55 ` Shawn O. Pearce
2009-11-16 8:28 ` Stephen Boyd
2009-11-18 0:49 ` [PATCH v3] " Jonathan Nieder
2009-11-18 0:59 ` Shawn O. Pearce
2009-11-11 18:42 ` excerpts from tomorrow's "What's cooking" draft Nicolas Sebrecht
2009-11-11 19:50 ` Nicolas Pitre
2009-11-11 21:07 ` Petr Baudis
2009-11-11 21:19 ` Nicolas Pitre
2009-11-11 21:26 ` Nicolas Sebrecht
2009-11-11 21:42 ` Petr Baudis
2009-11-11 22:04 ` Nicolas Pitre
2009-11-11 22:24 ` [PATCH] give priority to progress messages Nicolas Pitre
2009-11-11 18:54 ` excerpts from tomorrow's "What's cooking" draft Jakub Narebski
-- strict thread matches above, loose matches on Subject: below --
2009-10-22 6:52 What's cooking in git.git (Oct 2009, #04; Wed, 21) Junio C Hamano
2009-10-22 8:34 ` ks/precompute-completion (was Re: What's cooking in git.git (Oct 2009, #04; Wed, 21)) Stephen Boyd
2009-10-22 17:11 ` Sverre Rabbelier
2009-10-22 22:20 ` A Large Angry SCM
[not found] ` <fabb9a1e0910221555k287b45ebwb15ac97851b845f9@mail.gmail.com>
[not found] ` <fabb9a1e0910221556s694a344ag8e5ae07c35351ee4@mail.gmail.com>
2009-10-22 23:05 ` A Large Angry SCM
2009-10-23 18:27 ` Sverre Rabbelier
2009-10-23 18:59 ` ks/precompute-completion Junio C Hamano
2009-10-23 19:16 ` ks/precompute-completion Sverre Rabbelier
2009-10-23 20:05 ` ks/precompute-completion Junio C Hamano
2009-10-23 20:09 ` ks/precompute-completion Sverre Rabbelier
2009-10-23 20:20 ` ks/precompute-completion Jakub Narebski
2009-10-23 20:22 ` ks/precompute-completion Sverre Rabbelier
2009-10-23 22:29 ` ks/precompute-completion A Large Angry SCM
2009-10-23 22:39 ` ks/precompute-completion Sverre Rabbelier
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=20091111220832.GA31620@progeny.tock \
--to=jrnieder@gmail.com \
--cc=bebarino@gmail.com \
--cc=git@vger.kernel.org \
--cc=junio@pobox.com \
--cc=kirr@mns.spb.ru \
--cc=spearce@spearce.org \
--cc=srabbelier@gmail.com \
/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).