Mailinglist Archive: opensuse-bugs (3543 mails)

< Previous Next >
[Bug 717934] New: bash completions don't add a space anymore
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 14 Sep 2011 22:42:14 +0000
  • Message-id: <>

Summary: bash completions don't add a space anymore
Classification: openSUSE
Product: openSUSE 11.4
Version: Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Minor
Priority: P5 - None
Component: Basesystem
AssignedTo: werner@xxxxxxxx
ReportedBy: matz@xxxxxxxx
QAContact: qa@xxxxxxx
Found By: Development
Blocker: ---

This is a behavioral change from 11.3 to 11.4 .
Try this:
# ls /etc/inp<TAB>
it will complete to:
# ls /etc/inputrc _
(_ indicates the cursor position, i.e. the above adds a space after it
successfully completed to a single item). This assumes that /etc/inputrc
is the only completion for the above prefix, otherwise try with some other
file which is unique. Now try the same with less:

# less /etc/inp<TAB>
.. completes to ...
# less /etc/inputrc_

i.e. the cursor will be placed directly after the last character, which is
the same behaviour as if multiple completions would exist. Indeed pressing
<TAB> again results in a new call to the completion routines, of course with
the same single result. I find this change very annoying because in former
times I could simply continue typing with the next file names, and now I
have to enter the space myself. What's worse is, that I took the space after
a filename as indication that this was infact the only matching completion.
That it's now missing makes me always wonder if there are other completions,
hence I need to press <TAB> again to see that, no, in fact this is really
the only one. It breaks typing flow.

I see that the reason for this change is the unconditional addition of
"-o nospace" to the _file and _dir variables. That seems to have been
because _exp_ now calls _compreply_ which puts it's own '/' at the end
of directories (which it had to do because $HO<TAB> would otherwise be
incorrectly expanded). So we can't use -o filenames anymore. But if we were
simply adding spaces always this would breaks the flow of typing "/et<TAB>"
which would be completed to "/etc/ _", making it impossible to continue
typing the filename in a directory.

I will attach a patch which goes back to the 11.3 behaviour for non-directory
files only implementing what I think we should unconditionally do.

From looking at aaa_base-extras in the current factory tree it reads as
if the 11.4 behaviour is still current in 12.1.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >