[pacman-dev] [PATCH] database/print options, fix dirs, other
* add -D --database options and --print (shining)
* fix dirs showing up when they shouldn't in completions
The 5 month old log of fixes still applies:
http://www.mail-archive.com/pacman-dev@archlinux.org/msg04121.html
This is now down to 106 lines. The original one (master) is 365 lines
long, yet this one retains all functionality.
---
contrib/bash_completion | 430
+++++++++--------------------------------------
1 files changed, 83 insertions(+), 347 deletions(-)
diff --git a/contrib/bash_completion b/contrib/bash_completion
index f0b5f9c..216c664 100644
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -1,370 +1,106 @@
-# vim: set ft=sh ts=2 sw=2 et:
-# file: /etc/bash_completion.d/pacman
-
-# Bash completion for pacman
-# Original: Manolis Tzanidakis
On Sun, May 9, 2010 at 6:41 PM, Andres P
* add -D --database options and --print (shining) * fix dirs showing up when they shouldn't in completions
The 5 month old log of fixes still applies: http://www.mail-archive.com/pacman-dev@archlinux.org/msg04121.html
This is now down to 106 lines. The original one (master) is 365 lines long, yet this one retains all functionality.
What did you use to send this patch ? Can you please use git send-email if you didn't ? And if you cannot do that, an attachment would be better. Otherwise, the commit log should always describe the full changes of the patch, even for a resubmit. We don't want to rely on mail-archive.com for keeping the link valid forever, or any other mail archives. There is also an interesting practive on dri-devel about versioning resubmitted patches : http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg49816.html You simply use v2, v3 etc, and always keeping the original description, and adding what changed in each version / resubmit.
On Sun, May 9, 2010 at 4:33 PM, Xavier Chantry
What did you use to send this patch ? Can you please use git send-email if you didn't ? And if you cannot do that, an attachment would be better.
Good because I messed some stuff up attached, Andres
On Mon, May 10, 2010 at 1:27 AM, Andres P
On Sun, May 9, 2010 at 4:33 PM, Xavier Chantry
wrote: What did you use to send this patch ? Can you please use git send-email if you didn't ? And if you cannot do that, an attachment would be better.
Good because I messed some stuff up
Thanks, that last patch looks good and has everything I asked :) Just two comments : 1) Dan is still not happy about license change, even if this is a full rewrite. He would like to have all files in pacman project licensed with GPL2. But if you put this in public domain, I believe Dan could just relicense it in GPL2 himself. Anyway I don't like acting as an intermediary here, hopefully Dan and you can resolve this together. 2) Related to the directory completion I mentioned earlier : you restored old behavior, which is good. But the old behavior has a bug. It's not a regression in your patch, so not a show stopper, just wondering if you might have an idea. When there is both a directory and a package with the same name, the completion only sees the directory, and thus adds a trailing slash. $ mkdir acpitool $ pacman -S acpi<tab> acpi acpid acpitool/ $ pacman -S acpit<tab> $ pacman -S acpitool/ error: repository 'acpitool' not found error: 'acpitool/': no such repository
On Thu, May 13, 2010 at 9:12 AM, Xavier Chantry
1) Dan is still not happy about license change, even if this is a full rewrite. He would like to have all files in pacman project licensed with GPL2. But if you put this in public domain, I believe Dan could just relicense it in GPL2 himself. Anyway I don't like acting as an intermediary here, hopefully Dan and you can resolve this together.
As you said, my script is under the public domain so everyone is entitled to change and use it as they see fit. ;)
2) Related to the directory completion I mentioned earlier : you restored old behavior, which is good. But the old behavior has a bug. It's not a regression in your patch, so not a show stopper, just wondering if you might have an idea. When there is both a directory and a package with the same name, the completion only sees the directory, and thus adds a trailing slash.
$ mkdir acpitool $ pacman -S acpi<tab> acpi acpid acpitool/ $ pacman -S acpit<tab> $ pacman -S acpitool/ error: repository 'acpitool' not found error: 'acpitool/': no such repository
This is because -o filenames, which is needed for the 'pkg.tar.*' glob. I have a fix for this that only sets -o filenames when needed. Patch attached, Andres
On Wed, May 19, 2010 at 12:48 AM, Andres P
On Thu, May 13, 2010 at 9:12 AM, Xavier Chantry
wrote: 1) Dan is still not happy about license change, even if this is a full rewrite. He would like to have all files in pacman project licensed with GPL2. But if you put this in public domain, I believe Dan could just relicense it in GPL2 himself. Anyway I don't like acting as an intermediary here, hopefully Dan and you can resolve this together.
As you said, my script is under the public domain so everyone is entitled to change and use it as they see fit. ;)
2) Related to the directory completion I mentioned earlier : you restored old behavior, which is good. But the old behavior has a bug. It's not a regression in your patch, so not a show stopper, just wondering if you might have an idea. When there is both a directory and a package with the same name, the completion only sees the directory, and thus adds a trailing slash.
$ mkdir acpitool $ pacman -S acpi<tab> acpi acpid acpitool/ $ pacman -S acpit<tab> $ pacman -S acpitool/ error: repository 'acpitool' not found error: 'acpitool/': no such repository
This is because -o filenames, which is needed for the 'pkg.tar.*' glob. I have a fix for this that only sets -o filenames when needed.
Patch attached, Andres
Thanks, works for me ! It's a great work you did, that bash completion file was desperately looking for love :) IMO it would be a nice addition to the next release and definitely worth mentioning in the changelog.
participants (2)
-
Andres P
-
Xavier Chantry