shopt -s nullglob breaks bash_completion

Bug #668782 reported by luca
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: bash

Bash seems to be unable to auto-complete stuff if option nullglob is set. See:

luca@manuk:~$ shopt -s nullglob
luca@manuk:~$ ls /
Display all 147 possibilities? (y or n)
luca@manuk:~$ ls /bin
Display all 147 possibilities? (y or n)
luca@manuk:~$ ls /var
Display all 147 possibilities? (y or n)
luca@manuk:~$ ls /var # ENTER (no completion)
backups/ cache/ games/ lib/ local/ lock/ log/ mail/ opt/ run/ spool/ tmp/ www/
luca@manuk:~$ shopt -u nullglob
luca@manuk:~$ ls /
bin/ dev/ initrd.img media/ root/ .suspended var/
boot/ etc/ initrd.img.old mnt/ sbin/ sys/ vmlinuz
.cache/ home/ lib/ opt/ selinux/ tmp/ vmlinuz.old
cdrom/ initrd/ lost+found/ proc/ srv/ usr/
luca@manuk:~$ ls /var/
backups/ cache/ games/ lib/ local/ lock/ log/ mail/ opt/ run/ spool/ tmp/ www/
luca@manuk:~$ ls /var/l
lib/ local/ lock/ log/

This happened after I upgraded from Ubuntu 10.04 to 10.10.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: bash 4.1-2ubuntu4
ProcVersionSignature: Ubuntu 2.6.35-23.36-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic i686
Architecture: i386
Date: Sat Oct 30 12:37:19 2010
ProcEnviron:
 LANGUAGE=es_AR:es
 PATH=(custom, user)
 LANG=es_AR.utf8
 SHELL=/bin/bash
SourcePackage: bash

Revision history for this message
luca (llucax) wrote :
Revision history for this message
Spencer Bliven (quantum7) wrote :

I see this problem when I am ssh'd in, but not from gnome-terminal locally. It took me quite a while to track down the offending line in my bashrc.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in bash (Ubuntu):
status: New → Confirmed
Revision history for this message
C. Alex. North-Keys (erlkonig-talisman) wrote :

This is generally a collection of multiple bugs in bash-scripted completion functions that aren't correctly saving and restore the current glob setting to allow setting old-style globbing temporarily for their own use, much as IFS is typically handled. Disabling nullglob in a user .bashrc is nothing more than a workaround for that naive code written by others.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.