[Bug 778627] Re: In natty, bash completion now quotes shell variable references rather than expanding them
Dmitrijs Ledkovs
launchpad at surgut.co.uk
Tue Feb 12 10:47:36 UTC 2013
This bug was fixed in 4.2-3 upload, and hence is fixed in quantal and
raring.
However, there is a new option that one needs to set - direxpand.
direxpand
If set, bash replaces directory names with the results of word expansion when performing filename completion. This
changes the contents of the readline editing buffer. If not set, bash attempts to preserve what the user typed.
bash (4.2-3) unstable; urgency=low
* Apply upstream patches 025 - 029, fixes for
- When used in a shell function, `declare -g -a array=(compound assignment)'
creates a local variable instead of a global one.
- The `lastpipe' option does not behave correctly on machines where the
open file limit is less than 256.
- When the `extglob' shell option is enabled, pattern substitution does not
work correctly in the presence of multibyte characters.
- When using a word expansion for which the right hand side is evaluated,
certain expansions of quoted null strings include spurious ^? characters.
- Bash-4.2 tries to leave completed directory names as the user typed them,
without expanding them to a full pathname. One effect of this is that
shell variables used in pathnames being completed (e.g., $HOME) are left
unchanged, but the `$' is quoted by readline because it is a special
character to the shell. This patch introduces two things:
- A new shell option, `direxpand', which, if set, attempts to emulate the
bash-4.1 behavior of expanding words to full pathnames during
completion;
- A set of heuristics that reduce the number of times special characters
such as `$' are quoted when the directory name is not expanded.
* Mark bash and bash-static as Multi-Arch: foreign . Closes: #674120.
* Avoid warning for unset debian_chroot with -u (Marko Mäkelä).
Closes: #659940.
* Fix string expansion: \u and \U for code points U+0080 to U+00FF (Darran
Salt). Closes: #661386.
* Search $- for `i' for the interactivity test. Closes: #482194.
* Search for bash_completion in /usr/share/bash-completion too.
Closes: #655071, #655208.
-- Matthias Klose <doko at debian.org> Sun, 01 Jul 2012 13:45:35 +0200
** Also affects: bash (Ubuntu Quantal)
Importance: Undecided
Status: New
** Also affects: bash (Ubuntu Raring)
Importance: Undecided
Status: Confirmed
** Also affects: bash (Ubuntu Precise)
Importance: Undecided
Status: New
** Changed in: bash (Ubuntu Raring)
Status: Confirmed => Fix Released
** Changed in: bash (Ubuntu Quantal)
Status: New => Fix Released
** Changed in: bash (Ubuntu Precise)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/778627
Title:
In natty, bash completion now quotes shell variable references rather
than expanding them
Status in “bash” package in Ubuntu:
Fix Released
Status in “bash” source package in Precise:
Incomplete
Status in “bash” source package in Quantal:
Fix Released
Status in “bash” source package in Raring:
Fix Released
Status in “bash” package in Debian:
New
Status in “bash” package in Fedora:
New
Bug description:
Binary package hint: bash
~$ mkdir -p /tmp/testd/finger/toe
/tmp$ cd /tmp/testd
/tmp/testd$ td=`pwd`
/tmp/testd$ cd ../
/tmp$ ls $td/fing
Type a TAB character at this point, and bash completion makes the line:
/tmp$ ls \$td/finger
Note that while 'fing' has been expanded to 'finger ' (with a space at the end), the $td variable reference has had the
$ character quoted with a backslash. This prevents further extension of the pathname, and in fact makes
the command invalid; if I type a newline at this point, I get:
ls: cannot access $td/finger: No such file or directory
This is not useful behavior. I believe that in Ubuntu 10.10, the $td variable would have been expanded
to '/tmp/testd', and subsequent completions starting from '/tmp/testd/finger' would have worked.
[The version of /etc/bash_completion.d/acroread.sh that is installed starts with:
# _filedir : to handle file and directories with spaces in their names.
if ! type _filedir &> /dev/null ; then
so I don't think that file is overriding /etc/bash_completion's
_filedir ...]
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: bash 4.2-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Fri May 6 09:48:29 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, user)
LANG=en_US.UTF-8
LANGUAGE=en_US:en
SourcePackage: bash
UpgradeStatus: Upgraded to natty on 2011-04-30 (6 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/778627/+subscriptions
More information about the Ubuntu-sponsors
mailing list