Public bug reported:
Binary package hint: bash
System Information:
1) Ubuntu 8.04.1
2) bash 3.2-0ubuntu18
The problem is, that the shell double escapes special chars when hitting
tab. The problem is hard to describe, so do the following steps to
reproduce:
~$ mkdir -p dir2/"A B"
~$ touch dir2/A\ B/script
~$ chmod 755 dir2/A\ B/script
~$ ~/dir2/A\\\ B/script # (See explenation below)
bash: /home/koba/dir2/A\ B/script: No such file or directory
In line 3 I first enter "~/dir2/" and hit TAB. The shell completes that
to "~/dir2/A\ B/". The I hit TAB another time and end up with
"~/dir2/A\\\ B/script", as you see in the output above.
The behaviour ist the same, if you create another directory instead of
the file "script":
~$ mkdir -p dir2/"A B"/dir4
~$ ~/dir2/A\\\ B/dir4 # (hitting TAB 2 times as in the example above)
bash: /home/koba/dir2/A\ B/dir4: No such file or directory
This does only happen, if you use the '~'. Interestingly, the problem
disappears, if you use some more special chars in the name of "A B", as
seen here:
~$ mkdir -p dir2/"A & $ \ ? B"/dir4
~$ /home/koba/dir2/A\ \&\ \$\ \\\ \?\ B/dir4/ # (see explenation below)
bash: /home/koba/dir2/A & $ \ ? B/dir4/: is a directory
In line 2 I first enter " ~/dir2/" as in the other examples and hit TAB
2 times. So the completion works in this case (I copied line 3 just to
show, that it correctly recognized the escape chars and found the
directory).
edit:
One more thing: There are also troubles with fewer special chars as seen
in this case:
~$ mkdir -p dir2/"A & B"/dir4
~$ ~/dir2/A\\\ \\\&\\\ B/dir4
bash: /home/koba/dir2/A\ \&\ B/dir4: No such file or directory
** Affects: bash (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
Binary package hint: bash
System Information:
1) Ubuntu 8.04.1
2) bash 3.2-0ubuntu18
The problem is, that the shell double escapes special chars when hitting
tab. The problem is hard to describe, so do the following steps to
reproduce:
~$ mkdir -p dir2/"A B"
~$ touch dir2/A\ B/script
~$ chmod 755 dir2/A\ B/script
~$ ~/dir2/A\\\ B/script # (See explenation below)
bash: /home/koba/dir2/A\ B/script: No such file or directory
In line 3 I first enter "~/dir2/" and hit TAB. The shell completes that
to "~/dir2/A\ B/". The I hit TAB another time and end up with
"~/dir2/A\\\ B/script", as you see in the output above.
The behaviour ist the same, if you create another directory instead of
the file "script":
~$ mkdir -p dir2/"A B"/dir4
- ~$ ~/dir2/A\\\ B/dir4
+ ~$ ~/dir2/A\\\ B/dir4 # (hitting TAB 2 times as in the example above)
bash: /home/koba/dir2/A\ B/dir4: No such file or directory
This does only happen, if you use the '~'. Interestingly, the problem
disappears, if you use some more special chars in the name of "A B", as
seen here:
~$ mkdir -p dir2/"A & $ \ ? B"/dir4
~$ /home/koba/dir2/A\ \&\ \$\ \\\ \?\ B/dir4/ # (see explenation below)
bash: /home/koba/dir2/A & $ \ ? B/dir4/: is a directory
In line 2 I first enter " ~/dir2/" as in the other examples and hit TAB
2 times. So the completion works in this case (I copied line 3 just to
show, that it correctly recognized the escape chars and found the
directory).
+
+ edit:
+
+ One more thing: There are also troubles with fewer special chars as seen
+ in this case:
+
+ ~$ mkdir -p dir2/"A & B"/dir4
+ ~$ ~/dir2/A\\\ \\\&\\\ B/dir4
+ bash: /home/koba/dir2/A\ \&\ B/dir4: No such file or directory
--
bash completion double escapes
https://bugs.launchpad.net/bugs/247838
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs