Pressing TAB to complete a word escapes any "$" env var references on the line

Bug #1004112 reported by David M. Karr on 2012-05-24
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Undecided
Unassigned

Bug Description

On a command line in a terminal shell, with Bash, I typed a line like this:

$ ls $SOMEVAR/somedir/abc

(where the var "SOMEVAR" is defined, and represents a directory that has a "somedir" directory, and there is one or more files or directories in "somedir" that begin with "abc") and then pressed TAB, it produced this:

$ ls \$SOMEVAR/somedir/abc

(Added the backslash.)

If I then continue to try completion with TAB, it doesn't do anything, because the env var is now escaped. I now have to go back to the beginning of the env var reference and remove the backslash, and then go back to the end to try completion again.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: bash 4.2-2ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Thu May 24 10:46:32 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: bash
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers