Package: reprepro
Version: 4.17.0-1
Severity: wishlist
Tags: patch
Dear Maintainer,
reprepro has the nice feature of providing bash completion for codenames, e.g.
with the "list" subcommand.
Example repository:
$ cat /tmp/reprepro-test/conf/distributions
Origin: Test
Label: Test
Suite: mytestsuite
Codename: mytestsuite
Version: 3.1
Architectures: i386 amd64
Components: main
Description: Test suite
Origin: Test
Label: Test
Suite: unstable
Codename: sid
Version: 3.2
Architectures: i386 amd64
Components: main
Description: Test unstable
Tab completion works e.g. in the the following example:
$ reprepro -b /tmp/reprepro-test/ list <TAB> <TAB>
mytestsuite sid
Here, the existing suites are suggested for tab completion.
Currently, tab completion does not work, when the base-dir is
not explicitly specified, but set via the environment variable
"REPREPRO_BASE_DIR".
Example:
$ export REPREPRO_BASE_DIR=/tmp/reprepro-test
$ reprepro list <TAB> <TAB>
etch experimental sarge sid
whatever-you-defined woody
Instead of the existing suites, the dummy suites are suggested.
It would be nice if the environment variables "REPREPRO_BASE_DIR"
and "REPREPRO_CONF_DIR" could also be taken into account for bash completion.
As far as I can see, the attachted patch would add this support.
Please feel free to close this as WONTFIX in case the patch does
not work as it should or you do not see any good reason to add this support.
Best regards,
Michael
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages reprepro depends on:
ii libarchive13 3.1.2-11+b1
ii libbz2-1.0 1.0.6-8
ii libc6 2.22-7
ii libdb5.3 5.3.28-11
ii libgpg-error0 1.21-3
ii libgpgme11 1.6.0-3
ii liblzma5 5.1.1alpha+20120614-2.1
ii pinentry-curses 0.9.7-5
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages reprepro recommends:
ii apt 1.2.10
Versions of packages reprepro suggests:
ii gnupg-agent 2.1.11-7
pn inoticoming <none>
pn lzip <none>
-- no debconf information
>From 5559a564009c07611d7959283d6ea5d3e1afa7e4 Mon Sep 17 00:00:00 2001
From: Michael Weghorn <[email protected]>
Date: Sat, 23 Apr 2016 15:39:45 +0200
Subject: [PATCH] bash completion: Support REPREPRO_{BASE,CONFIG}_DIR
Use the value of those environment variables as
basis for the bash completion in case no params are given
which explicity specify other values.
---
docs/reprepro.bash_completion | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/reprepro.bash_completion b/docs/reprepro.bash_completion
index b548cef..3d28c06 100644
--- a/docs/reprepro.bash_completion
+++ b/docs/reprepro.bash_completion
@@ -2,8 +2,8 @@ _reprepro()
{
local cur prev commands options noargoptions i state cmd ignores hiddencommands commands codenames confdir outdir basedir architectures components importrules snapshots
- confdir=""
- basedir=""
+ confdir="$REPREPRO_CONFIG_DIR"
+ basedir="$REPREPRO_BASE_DIR"
outdir=""
function parse_config() {
--
2.8.1