Debian Bug report logs - #678174
bash-completion: /etc/profile.d/bash_completion.sh does not work for non-login shells (e.g., screen, xterm)

version graph

Package: bash-completion; Maintainer for bash-completion is Gabriel F. T. Gomes <gabriel@debian.org>; Source for bash-completion is src:bash-completion (PTS, buildd, popcon).

Reported by: Matthijs Kooijman <matthijs@stdin.nl>

Date: Tue, 19 Jun 2012 18:51:01 UTC

Severity: minor

Found in version bash-completion/1:1.99-3

Fix blocked by 675008: bash: should handle /etc/bashrc.d (or similar) for non-login interactive shell

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#678174; Package bash-completion. (Tue, 19 Jun 2012 18:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to Matthijs Kooijman <matthijs@stdin.nl>:
New Bug report received and forwarded. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Tue, 19 Jun 2012 18:51:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Matthijs Kooijman <matthijs@stdin.nl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: bash-completion: /etc/profile.d/bash_completion.sh does not work for non-login shells (e.g., screen, xterm)
Date: Tue, 19 Jun 2012 20:28:22 +0200
Package: bash-completion
Version: 1:1.99-3
Severity: minor

Hi folks,

as was already mentioned in an aside in #593835: It's nice that
bash_completion is now enabled by default through /etc/profile.d, but
this only works for login shells. In particular, shells running in a
screen session or a terminal emulator like xterm, don't get bash
completion enabled right now.

This can cause confusion for users, when completion works in one shell,
but not the other. Also, when trying to fix this by enabling
bash_completion in /etc/bash.bashrc, it is enabled twice for login
shells, leading to extra login delays (though it seems
/etc/profile.d/bash_completion bails out if it's already loaded, so I
guess I've imagined this...).

I am aware that this issue is ultimately caused by how /etc/profile[.d]
works, and I do not know of any way to easily fix this (but that doesn't
mean there is none).

It seems to me that the best place to put the enabling code is in
/etc/bash.bashrc, but that's of course not up to the bash-completion
package.

One thing that springs to mind is to have bash offer an
/etc/bash.bashrc.d directory similar to /etc/profile.d, so
bash-completion can ship a hook in there instead of in /etc/profile.d.
Seems there's already a wishlist bug for that against bash: #675008.

Gr.

Matthijs




Added blocking bug(s) of 678174: 675008 Request was from Anders Kaseorg <andersk@MIT.EDU> to control@bugs.debian.org. (Wed, 12 Dec 2012 22:57:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#678174; Package bash-completion. (Sun, 16 Dec 2012 15:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Matthijs Kooijman <matthijs@stdin.nl>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Sun, 16 Dec 2012 15:39:03 GMT) (full text, mbox, link).


Message #12 received at 678174@bugs.debian.org (full text, mbox, reply):

From: Matthijs Kooijman <matthijs@stdin.nl>
To: 678174@bugs.debian.org
Subject: Re: bash-completion: /etc/profile.d/bash_completion.sh does not work for non-login shells (e.g., screen, xterm)
Date: Sun, 16 Dec 2012 15:58:09 +0100
Hi,

> It seems to me that the best place to put the enabling code is in
> /etc/bash.bashrc, but that's of course not up to the bash-completion
> package.
> 
> One thing that springs to mind is to have bash offer an
> /etc/bash.bashrc.d directory similar to /etc/profile.d, so
> bash-completion can ship a hook in there instead of in /etc/profile.d.
> Seems there's already a wishlist bug for that against bash: #675008.

It seems that the wheezy version of bash now has bash-completion enabled
in /etc/skel/.bashrc, which would remove the need for this
/etc/profile.d/bash_completion.sh file altogether (though just removing
it would not offer painless migration for existing users, of course...).

Gr.

Matthijs



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 09:47:58 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.