Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 102386

Summary: Bash does wrong completion for names beginning with "="
Product: Gentoo Linux Reporter: Matteo Settenvini <matteo-ml>
Component: [OLD] Core systemAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED INVALID    
Severity: normal CC: vapier
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Matteo Settenvini 2005-08-13 08:47:23 UTC
Bash seems to have a problem with the else widely accepted filenames that begin
with a '=' (aka 0x3D).

For example, try to:
1) open a console
2) mkdir =dir
3) now type :  "cd =" followed by as many <TAB> as you want

You'll see that it echoes "cd =\=" and beeps unpleasantly.

4) not satisfacted, try to type: "cd =dir" followed by a <TAB>.

Bash cleverly expands the line to a tr
Comment 1 Matteo Settenvini 2005-08-13 08:47:23 UTC
Bash seems to have a problem with the else widely accepted filenames that begin
with a '=' (aka 0x3D).

For example, try to:
1) open a console
2) mkdir =dir
3) now type :  "cd =" followed by as many <TAB> as you want

You'll see that it echoes "cd =\=" and beeps unpleasantly.

4) not satisfacted, try to type: "cd =dir" followed by a <TAB>.

Bash cleverly expands the line to a trés jolie "cd =\=dir/".
If this is art, I don't understand it.

Why do I bother with such a (apparently) silly issue?
a) I use GNU Arch. That should give you a strong hint.
b) I've ears quite sensitive to the PC speaker high pitch, expecially when
hacking away at 2AM. Every single beep booms inside my head like the hammer of
doom banging on the mighty gong of perception. If you didn't understand the last
sentence, never mind: it's Zen, after all. It's not meant to.
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2005-08-13 09:32:13 UTC
It should probably be mentioned that bash doesn't have a problem with this; its
default completion treats = as it should. It's a problem with the
bash-completion package.
Comment 3 SpanKY gentoo-dev 2006-05-03 18:35:51 UTC
feature, not bug:
http://lists.gnu.org/archive/html/bug-bash/2006-04/msg00060.html