Opened 13 years ago

Closed 13 years ago

#4945 closed bug (fixed)

bash4 tab completion causes shell to hang/crash

Reported by: augiedoggie Owned by: korli
Priority: high Milestone: R1
Component: Applications/Command Line Tools Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All


The new version of bash is having problems with tab completion. When I type 'cd /' and then a tab to complete the path, the shell either crashes or hangs. This happens on gcc2 and gcc4 on real hardware and via virtualbox.

Attachments (1)

bash4.tabfix.diff (483 bytes ) - added by augiedoggie 13 years ago.
Fix for tab completion problems

Download all attachments as: .zip

Change History (8)

comment:1 by anevilyak, 13 years ago

Component: - GeneralApplications/Command Line Tools
Owner: changed from nobody to korli
Priority: normalhigh

comment:2 by anevilyak, 13 years ago

This doesn't seem to be the case globally....for cd I can reproduce it but for instance just tab completing a path to a file such as an executable works for me at least, maybe a problem with the completion rules file?

comment:3 by axeld, 13 years ago

Does the problem go away if you remove the /etc/bash_completion* files?

comment:4 by augiedoggie, 13 years ago

I haven't tried removing the files, but, it does go away with programmable completion disabled using 'shopt -u progcomp' . I did look into it a little bit. Seems to be triggered somewhere in the _filedir() function of /etc/bash_completion.

I can test removing the files later.

comment:5 by augiedoggie, 13 years ago

Many other commands are causing the shell to exit. I've tried chown/chgrp/kill/find/scp/etc... and all of these do the same thing when attempting to complete. I've also tried using the bash_completion file from Ubuntu and I get the same results. Moving the bash_completion files out of the way does allow the commands to work using basic file completion.

comment:6 by augiedoggie, 13 years ago

Found a possible fix after searching through the Ubuntu launchpad diffs. The full diff file is here. Attaching a small patch which seems to fix the problem for me.

by augiedoggie, 13 years ago

Attachment: bash4.tabfix.diff added

Fix for tab completion problems

comment:7 by korli, 13 years ago

Resolution: fixed
Status: newclosed

Fix the issue by applying patches 001 to 035 in hrev34030

Note: See TracTickets for help on using tickets.