Merge lp:~gagern/bzr-gentoo-overlay/bzr-bash-completion into lp:~malept/bzr-gentoo-overlay/overlay-main

Proposed by Martin von Gagern
Status: Merged
Merged at revision: 362
Proposed branch: lp:~gagern/bzr-gentoo-overlay/bzr-bash-completion
Merge into: lp:~malept/bzr-gentoo-overlay/overlay-main
Diff against target: 80 lines (+60/-0)
4 files modified
dev-vcs/bzr-bash-completion/ChangeLog (+10/-0)
dev-vcs/bzr-bash-completion/Manifest (+4/-0)
dev-vcs/bzr-bash-completion/bzr-bash-completion-1.0.2.ebuild (+37/-0)
dev-vcs/bzr-bash-completion/metadata.xml (+9/-0)
To merge this branch: bzr merge lp:~gagern/bzr-gentoo-overlay/bzr-bash-completion
Reviewer Review Type Date Requested Status
Mark Lee Approve
Review via email: mp+21372@code.launchpad.net

Description of the change

The bash completion script shipped with bzr is horribly outdated. And with the plugin infrastructure of bzr, no static completion script can ever hope to deal with all options in a reasonable way.

To deal with these issues, I've written a bzr plugin that generates a suitable completion function dynamically. This ebuild installs the plugin. It also installs a small static function for eselect-able bash completion, which will generate the full completion function upon first invocation. This lazy generation prevents long bash initialization delays.

To post a comment you must log in.
Revision history for this message
Christian Faulhammer (fauli) wrote :

Have you contacted the bzr developers about it?

Revision history for this message
Martin von Gagern (gagern) wrote :

> Have you contacted the bzr developers about it?

I've told them when I started the project:
https://lists.ubuntu.com/archives/bazaar/2009q3/062773.html

Back then I didn't have the lazy init, but I assume bzr devs interested would have noted the project and followed it since. Not sure, though.

http://wiki.bazaar.canonical.com/BzrPlugins#line-166 also lists the plugin "officially", so there is another way for people to notice it.

Revision history for this message
Mark Lee (malept) wrote :

Merged by inference (as it was already merged in the bzr-overlay-dev branch).

Although as a user, I would greatly prefer it if you could try to get it into bzr core, (file a bug!) replacing the (less than ideal) bash completion scripts that are bundled.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'dev-vcs/bzr-bash-completion'
2=== added file 'dev-vcs/bzr-bash-completion/ChangeLog'
3--- dev-vcs/bzr-bash-completion/ChangeLog 1970-01-01 00:00:00 +0000
4+++ dev-vcs/bzr-bash-completion/ChangeLog 2010-03-15 13:53:13 +0000
5@@ -0,0 +1,10 @@
6+# ChangeLog for dev-vcs/bzr-bash-completion
7+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
8+# $Header: $
9+
10+*bzr-bash-completion-1.0.2 (15 Mar 2010)
11+
12+ 15 Mar 2010; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
13+ +bzr-bash-completion-1.0.2.ebuild, +metadata.xml:
14+ Initial ebuild.
15+
16
17=== added file 'dev-vcs/bzr-bash-completion/Manifest'
18--- dev-vcs/bzr-bash-completion/Manifest 1970-01-01 00:00:00 +0000
19+++ dev-vcs/bzr-bash-completion/Manifest 2010-03-15 13:53:13 +0000
20@@ -0,0 +1,4 @@
21+DIST bzr-bash-completion-1.0.2.tar.gz 7603 RMD160 f6be64105921655923083f89e1cb381cd8069032 SHA1 7e0b5764121b9ac6937cff36ad414c6743a21850 SHA256 37c3bbc8e0a0f76c4aee87db7dc887a5a78b9a0a5096922992d46a2606905943
22+EBUILD bzr-bash-completion-1.0.2.ebuild 1037 RMD160 97b57b0038e81513cc486c3313e4b2f3562b62ea SHA1 c220826a2d659bb4faccf1a34337b62abd6798c9 SHA256 dc46c62b349cbca433c35e0aa02d30f6ac0532d36a589390eda71abc80be9268
23+MISC ChangeLog 305 RMD160 054a5f333b70cd190edb3be7432e75084ea8f939 SHA1 81b138463e4b072df41085291aa00d9180a5bb70 SHA256 b17015bf99b4bedb0b0b393efe13ba700450cd4dbd232a656346cdb653f15718
24+MISC metadata.xml 313 RMD160 5037f6aeced048ad62d0272cec44453ca30ff6f8 SHA1 3e6242d576c2421aa19b7afbda6b27536a16103a SHA256 69c8b1939eb2abfa9f8e01cdb75c66185ac7430130f6aedcb82217d7d8a441f0
25
26=== added file 'dev-vcs/bzr-bash-completion/bzr-bash-completion-1.0.2.ebuild'
27--- dev-vcs/bzr-bash-completion/bzr-bash-completion-1.0.2.ebuild 1970-01-01 00:00:00 +0000
28+++ dev-vcs/bzr-bash-completion/bzr-bash-completion-1.0.2.ebuild 2010-03-15 13:53:13 +0000
29@@ -0,0 +1,37 @@
30+# Copyright 1999-2010 Gentoo Foundation
31+# Distributed under the terms of the GNU General Public License v2
32+# $Header: $
33+
34+EAPI=2
35+
36+inherit distutils
37+
38+DESCRIPTION="Bash completion for the bazaar bzr command"
39+HOMEPAGE="https://launchpad.net/${PN}"
40+SRC_URI="http://pypi.python.org/packages/source/${PN:0:1}/${PN}/${P}.tar.gz"
41+
42+LICENSE="GPL2"
43+SLOT="0"
44+KEYWORDS="~amd64 ~x86"
45+IUSE=""
46+
47+DEPEND=""
48+RDEPEND=">=app-shells/bash-completion-1.1-r5
49+ dev-vcs/bzr[-bash-completion]"
50+
51+src_prepare() {
52+ distutils_src_prepare || die "Failed to prepare python code"
53+
54+ # Other bash-completion functions don't set progcomp either
55+ sed -i '/^shopt -s progcomp$/d' lazy.sh
56+}
57+
58+src_install() {
59+ distutils_src_install || die "Failed to install python code"
60+
61+ # we cannot use dobashcompletion from bash-completion.eclass, as
62+ # that eclass assumes a bash-completion IUSE, which we don't want.
63+ # So we have to copy its functionality. All two lines of it. :-)
64+ insinto /usr/share/bash-completion
65+ newins lazy.sh bzr || die "Failed to install lazy completion script"
66+}
67
68=== added file 'dev-vcs/bzr-bash-completion/metadata.xml'
69--- dev-vcs/bzr-bash-completion/metadata.xml 1970-01-01 00:00:00 +0000
70+++ dev-vcs/bzr-bash-completion/metadata.xml 2010-03-15 13:53:13 +0000
71@@ -0,0 +1,9 @@
72+<?xml version="1.0" encoding="UTF-8"?>
73+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
74+<pkgmetadata>
75+ <herd>no-herd</herd>
76+ <maintainer>
77+ <email>Martin.vGagern@gmx.net</email>
78+ <description>bzr-bash-completion maintainer and Gentoo user</description>
79+ </maintainer>
80+</pkgmetadata>

Subscribers

People subscribed via source and target branches

to status/vote changes: