Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#995230: ripgrep: add autocompletion for bash

102 views
Skip to first unread message

Laurent Cheylus

unread,
Sep 28, 2021, 4:50:03 AM9/28/21
to
Package: ripgrep
Version: 13.0.0-2
Severity: normal

Hi,

during build of ripgrep, a script (rg.bash) is generated via clap tool
for autocompletion (see
https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#complete).

./target/release/build/ripgrep-<random value>/out/rg.bash

This script is not included in Debian package v13.0.0-2. Please add it
to be installed as /usr/share/bash-completion/completions/rg.


PS : there is also a rg.fish generated during build for completion with
fish shell.

regards, Laurent


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ripgrep depends on:
ii libc6 2.32-4
ii libgcc-s1 11.2.0-7

ripgrep recommends no packages.

ripgrep suggests no packages.

-- no debconf information

Florian Ernst

unread,
Feb 20, 2022, 8:30:03 AM2/20/22
to
On Tue, Sep 28, 2021 at 10:43:53AM +0200, Laurent Cheylus wrote:
> during build of ripgrep, a script (rg.bash) is generated via clap tool
> for autocompletion (see [...]
> This script is not included in Debian package v13.0.0-2. Please add it
> to be installed as /usr/share/bash-completion/completions/rg.

In commit 7f0d6ae of rust-team/debcargo-conf the corresponding "--with
bash-completion" was dropped, most presumably by accident. As such bash
autocompletion was missing ever since 13.0.0-1. Readding that part
brings back the missing file:

| diff -Nru rust-ripgrep-13.0.0/debian/rules rust-ripgrep-13.0.0/debian/rules
| --- rust-ripgrep-13.0.0/debian/rules 2021-08-31 22:06:04.000000000 +0200
| +++ rust-ripgrep-13.0.0/debian/rules 2022-02-20 13:48:27.000000000 +0100
| @@ -1,6 +1,6 @@
| #!/usr/bin/make -f
| %:
| - dh $@ --buildsystem cargo
| + dh $@ --buildsystem cargo --with bash-completion
|
| execute_after_dh_testdir:
| find . ! -newermt "jan 01, 2000" -exec touch {} +

and then after rebuilding the binary package

| $ debdiff ripgrep_13.0.0-2_amd64.deb ripgrep_13.0.0-2.1_amd64.deb
| [The following lists of changes regard files as different if they have
| different names, permissions or owners.]
|
| Files in second .deb but not in first
| -------------------------------------
| -rw-r--r-- root/root /usr/share/bash-completion/completions/rg
| drwxr-xr-x root/root /usr/share/bash-completion/
| drwxr-xr-x root/root /usr/share/bash-completion/completions/
|
| Control files: lines which differ (wdiff format)
| [...]

Cheers,
Flo
signature.asc

Sylvestre Ledru

unread,
Feb 20, 2022, 12:50:04 PM2/20/22
to
It seems. Would you like to provide a MR ?

thanks
S

Florian Ernst

unread,
Feb 20, 2022, 2:30:04 PM2/20/22
to
On Sun, Feb 20, 2022 at 06:42:54PM +0100, Sylvestre Ledru wrote:
> Le 20/02/2022 à 14:25, Florian Ernst a écrit :
> > In commit 7f0d6ae of rust-team/debcargo-conf the corresponding "--with
> > bash-completion" was dropped, most presumably by accident. As such bash
> > autocompletion was missing ever since 13.0.0-1. Readding that part
> > brings back the missing file:
> > [...]
> It seems. Would you like to provide a MR ?

Truth be told, I actively avoided the formal overhead of a MR for such a
tiny change. Feel free to just fix it in git.

However, if some policy of sorts requires a MR I will file one. If it's
just for attribution, though, I personally see no need.

Cheers,
Flo
signature.asc

Sylvestre Ledru

unread,
Feb 20, 2022, 2:50:03 PM2/20/22
to
i didn't realize that you are a DD :)

sorry

S
0 new messages