Debian Bug report logs -
#549550
bash-completion: Defined functions clash with user environment
Reported by: Jari Aalto <jari.aalto@cante.net>
Date: Sun, 4 Oct 2009 10:57:08 UTC
Severity: important
Tags: confirmed, upstream
Found in version bash-completion/1:1.0-3
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#549550; Package bash-completion.
(Sun, 04 Oct 2009 10:57:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Jari Aalto <jari.aalto@cante.net>:
New Bug report received and forwarded. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Sun, 04 Oct 2009 10:57:11 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: bash-completion
Version: 1:1.0-3
Severity: important
Tags: patch
PROBLEM
By installing bash completion package, there are serious environment
clashes. The function in the package do not have distinct prefixes to
differentiate them from the user's aliases and functions; so
there will be an inevitable clash at some point.
It happened in my case: I have several those functions defined (quote,
dequote, have, _expand, _services, _alias, _export, _umount, _mount,
_man, _tar, _cvs, _rsync, _make, _cd, _screen) from years of use. The
choice of private functions/aliases to underscore(_) prefix was natural
in order to differentiate them from system commands.
RELATED
The Emacs packages have had exactly the same problems and solutions.
In Emacs, all the functions occupy the same global name space; just
like Bash aliases and functions do.
The make the packages unique, each one of them chose to use a unique
prefix. This can be seen e.g. in the Gnus newsreader package, which
uses prefix gnus-* for functions, and message.el that uses message-*
respectively. Likewise for all Emacs packages.
SUGGESTION
The problem can be solved by using a common prefix for all functions.
The provided git patches will convert everything to start with prefix:
_bc_* for "bash completion".
THE PATCHES
As there are about 360 individual patch sets, please merge in the
changes from repository:
git remote add jaalto git://git.cante.net/dev/bash-completion
git pull jaalto
Branch to merge:
naming-changes-all
NOTES
I've done my best to make the correct replacements (all by hand; eye
balling; no scripts). As this is the starting point for the dev team,
please continue and correct any mistakes you see as needed.
I hope, the patches provide a good start to make the bash completion
package more robust to install.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bash-completion depends on:
ii bash 4.0-4 The GNU Bourne Again SHell
bash-completion recommends no packages.
bash-completion suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#549550; Package bash-completion.
(Fri, 11 Jun 2010 13:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Fri, 11 Jun 2010 13:21:03 GMT) (full text, mbox, link).
Message #10 received at 549550@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 549550 confirmed upstream
user bash-completion-devel@lists.alioth.debian.org
usertags 549550 target-2.0
thanks
Hello,
On Sun, 04 Oct 2009 13:33:34 +0300, Jari Aalto wrote:
> PROBLEM
>
> By installing bash completion package, there are serious environment
> clashes. The function in the package do not have distinct prefixes to
> differentiate them from the user's aliases and functions; so
> there will be an inevitable clash at some point.
> [..]
We have already planned it for quite some time, it's in our roadmap for 2.0:
http://wiki.debian.org/Teams/BashCompletion/Proposals/Roadmap
Kindly,
David
--
. ''`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]
Added tag(s) upstream and confirmed.
Request was from David Paleino <dapal@debian.org>
to control@bugs.debian.org.
(Fri, 11 Jun 2010 13:21:13 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#549550; Package bash-completion.
(Thu, 21 Nov 2013 19:33:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Ken Sharp <imwellcushtymelike@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>.
(Thu, 21 Nov 2013 19:33:05 GMT) (full text, mbox, link).
Message #17 received at 549550@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Have any changes been made? 2.x series is in Testing.
[Message part 2 (text/html, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Gabriel F. T. Gomes <gabriel@inconstante.eti.br>:
Bug#549550; Package bash-completion.
(Thu, 08 Nov 2018 01:06:03 GMT) (full text, mbox, link).
Acknowledgement sent
to "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>:
Extra info received and forwarded to list. Copy sent to Gabriel F. T. Gomes <gabriel@inconstante.eti.br>.
(Thu, 08 Nov 2018 01:06:03 GMT) (full text, mbox, link).
Message #22 received at 549550@bugs.debian.org (full text, mbox, reply):
Control: tags -1 - patch
After such a long time, the patch provided for this bug is no longer
accessible, and even if it was, I doubt it would apply.
Removed tag(s) patch.
Request was from "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>
to 549550-submit@bugs.debian.org.
(Thu, 08 Nov 2018 01:06:03 GMT) (full text, mbox, link).
Changed Bug title to 'bash-completion: Defined functions clash with user environment' from '[PATCH] bash-completion: Defined functions clash with user environment'.
Request was from "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>
to control@bugs.debian.org.
(Sat, 08 Aug 2020 16:51:02 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 09:46:33 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.