Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#2394 - /etc/profile/bash-completion.sh

Attached to Project: Arch Linux
Opened by Angelo Theodorou (encelo) - Thursday, 17 March 2005, 04:56 GMT
Last edited by Aurelien Foret (aurelien.foret) - Saturday, 25 March 2006, 19:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Aurelien Foret (aurelien.foret)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It has to be a problem in the condition, because the bash-completion script is not included automatically.
This task depends upon

Closed by  Jan de Groot (JGC)
Thursday, 03 August 2006, 21:34 GMT
Reason for closing:  Fixed
Comment by Dimos Dimoulis (dimosd) - Friday, 18 March 2005, 00:35 GMT
Not sure if this is the same problem I had

bash_completion, when sourced by /etc/profile, works for interactive login shells (e.g. console) but not interactive non-logins shells (e.g. xterm, by default)

The correct way to do this is source it in .bashrc
Comment by Benny Kjellgren (benny) - Thursday, 26 January 2006, 09:53 GMT
Perhaps add this to /etc/skel/.bashrc (change the file in the package)
---
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
---
Comment by Francois Charette (Firmicus) - Monday, 13 March 2006, 10:53 GMT
The problem in /etc/profile.d/bash_completion.sh is the prompt test [ "$PS1" ] which is false in a script: it should instead be [ -z $PS1 ] (no quotes!).

Also the bash version tests are superfluous because all this is taken care of by the bash_completion program (and ArchLinux has an uptodate bash anyway ;-).

But I agree with Benny that bash_completion should be sourced from ~/.bashrc not from /etc/profile.d
Comment by Aurelien Foret (aurelien.foret) - Saturday, 25 March 2006, 19:37 GMT
Bug reopened: stripping quotes is not the way to go.
It breaks the script if there's a space character in PS1 (default case in an Arch Linux setup)!!!
Comment by arjan timmerman (blaasvis) - Sunday, 26 March 2006, 13:10 GMT
suggestions on how to fix it ?
Comment by arjan timmerman (blaasvis) - Sunday, 26 March 2006, 17:23 GMT
ok after discussing it on irc, it seems -n "$PS1" is best...

implemented in -4

Loading...