You are not logged in.

#1 2008-08-12 09:13:36

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

bash-completion : upsteam is dead, what to do?

Any users using bash completion or interested by it, please have a look at :
http://bugs.archlinux.org/task/11196


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#2 2008-08-12 12:47:42

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: bash-completion : upsteam is dead, what to do?

I've given packaging this a shot. It's in AUR if anyone is interested: http://aur.archlinux.org/packages.php?ID=19056

It doesn't read the files in /etc/bash_completion.d however, so no completion for pacman at the moment.

However playing around with it shows that it lacks some sad . It does make wrong assumptions regarding directories. Seems pretty debianish to me. And then there is the problem that you can't just include the completion files supplied by other packages, as I see it you would have to split them first.

Last edited by Garns (2008-08-12 12:56:29)

Offline

#3 2008-08-12 13:12:49

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: bash-completion : upsteam is dead, what to do?

Garns wrote:

I've given packaging this a shot. It's in AUR if anyone is interested: http://aur.archlinux.org/packages.php?ID=19056

It doesn't read the files in /etc/bash_completion.d however, so no completion for pacman at the moment.

However playing around with it shows that it lacks some sad . It does make wrong assumptions regarding directories. Seems pretty debianish to me. And then there is the problem that you can't just include the completion files supplied by other packages, as I see it you would have to split them first.

Thanks for looking at it. So it does not look so good. I hoped it could be used as a drop-in replacement but that is not the case if it broke backward compatibility tongue
One minor comment : you apparently didn't include the bash_completion_lib.sh file in the tarball. Probably that bug ? :
http://projects.archlinux.org/?p=pacman … 7f13696493

There is also that newer bash-completion version from debian to look at :
http://ftp.de.debian.org/debian/pool/ma … 705.tar.gz


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#4 2008-08-12 13:31:40

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: bash-completion : upsteam is dead, what to do?

shining wrote:

One minor comment : you apparently didn't include the bash_completion_lib.sh file in the tarball. Probably that bug ? :
http://projects.archlinux.org/?p=pacman … 7f13696493

I should not just read the dev-list. I should remember what I read there...

Seems AUR bugged when I tried to update roll :

Could not create directory /home/aur/unsupported/bash_completion_lib

The directory is there, but is empty yikes.

There is also that newer bash-completion version from debian to look at :
http://ftp.de.debian.org/debian/pool/ma … 705.tar.gz

I might take a look at it later. However they have the same line in their bash-competion.sh which started the whole story...

Plus I'm not really sure how vanilla a debian/ubuntu patched version will be...

Offline

#5 2008-08-12 13:53:18

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: bash-completion : upsteam is dead, what to do?

Garns wrote:
shining wrote:

One minor comment : you apparently didn't include the bash_completion_lib.sh file in the tarball. Probably that bug ? :
http://projects.archlinux.org/?p=pacman … 7f13696493

I should not just read the dev-list. I should remember what I read there...

Seems AUR bugged when I tried to update roll :

Could not create directory /home/aur/unsupported/bash_completion_lib

The directory is there, but is empty yikes.

There is also that newer bash-completion version from debian to look at :
http://ftp.de.debian.org/debian/pool/ma … 705.tar.gz

I might take a look at it later. However they have the same line in their bash-competion.sh which started the whole story...

Plus I'm not really sure how vanilla a debian/ubuntu patched version will be...

Well, apparently debian is now more or less the upstream, so smile
And I believe they usually use a "normal" source tarball, and add the other debian specific stuff and other patches in a diff.gz

Otherwise, you are right indeed, this tarball provides a bash-completion.sh script which has the PS1 check. But note that the archlinux package already used its own copy, probably based on it.

There are some differences too. For example, arch one use $SHELL for detecting that the shell is indeed bash, while this script uses $BASH_VERSION. Not sure which one is better though.
When I use zsh as my login shell, and launch bash from zsh, $SHELL stays defined to zsh. So $SHELL does not seems safe to use.
However I didn't try using bash as login shell, launching zsh and checking $BASH_VERSION


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#6 2008-08-12 14:46:32

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: bash-completion : upsteam is dead, what to do?

shining wrote:
Garns wrote:

There is also that newer bash-completion version from debian to look at :
http://ftp.de.debian.org/debian/pool/ma … 705.tar.gz

I might take a look at it later. However they have the same line in their bash-competion.sh which started the whole story...

Plus I'm not really sure how vanilla a debian/ubuntu patched version will be...

Well, apparently debian is now more or less the upstream, so smile
And I believe they usually use a "normal" source tarball, and add the other debian specific stuff and other patches in a diff.gz

Otherwise, you are right indeed, this tarball provides a bash-completion.sh script which has the PS1 check. But note that the archlinux package already used its own copy, probably based on it.

There are some differences too. For example, arch one use $SHELL for detecting that the shell is indeed bash, while this script uses $BASH_VERSION. Not sure which one is better though.
When I use zsh as my login shell, and launch bash from zsh, $SHELL stays defined to zsh. So $SHELL does not seems safe to use.
However I didn't try using bash as login shell, launching zsh and checking $BASH_VERSION

[garns@tanith ~]$ echo $BASH_VERSION
3.2.39(1)-release
[garns@tanith ~]$ zsh
tanith% echo $BASH_VERSION

This looks better indeed.

I went back to the original 2006 package, seems like it wasn't really vanilla to begin with:

[garns@tanith etc]$ grep apt-cache bash_completion|wc -l
12
[garns@tanith etc]$ grep apt-get bash_completion|wc -l
3
[garns@tanith etc]$ grep dpkg bash_completion|wc -l
31
[garns@tanith etc]$ grep aptitude bash_completion|wc -l
4

So using the debian package probably wouldn't change much in that regard.

Offline

#7 2008-08-12 15:36:29

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: bash-completion : upsteam is dead, what to do?

Garns wrote:
[garns@tanith ~]$ echo $BASH_VERSION
3.2.39(1)-release
[garns@tanith ~]$ zsh
tanith% echo $BASH_VERSION

This looks better indeed.

Ok nice, this will also have to be taken into account when the package is updated.

I went back to the original 2006 package, seems like it wasn't really vanilla to begin with:

[garns@tanith etc]$ grep apt-cache bash_completion|wc -l
12
[garns@tanith etc]$ grep apt-get bash_completion|wc -l
3
[garns@tanith etc]$ grep dpkg bash_completion|wc -l
31
[garns@tanith etc]$ grep aptitude bash_completion|wc -l
4

So using the debian package probably wouldn't change much in that regard.

Well, it could also be only because debian tools are infinitely more used than pacman for instance.
There are dozens of distribs based on it, and with Ubuntu and Debian alone, the userbase is already huge.
And note that rpm is in bash_completion too smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB