Opened 10 years ago

Closed 10 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:
Has a Patch: no Platform: All

Description

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 10 years ago.
Fix for tab completion problems

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by anevilyak

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

comment:2 Changed 10 years ago by anevilyak

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 Changed 10 years ago by axeld

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

comment:4 Changed 10 years ago by augiedoggie

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 Changed 10 years ago by augiedoggie

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 Changed 10 years ago by augiedoggie

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.

Changed 10 years ago by augiedoggie

Attachment: bash4.tabfix.diff added

Fix for tab completion problems

comment:7 Changed 10 years ago by korli

Resolution: fixed
Status: newclosed

Fix the issue by applying patches 001 to 035 in hrev34030

Note: See TracTickets for help on using tickets.