Ubuntu11.04bash completion

Source: Internet
Author: User
During the past few days, when using Ubuntu command lines, there are always some inexplicable spaces. For example, $ ls/var should normally show $ ls/var/, but I am now $ ls/var space dude./var is a directory, not a file, you cannot add spaces to the backend. This should be a problem with bash completion. Cause of problem: https://bugs.launchpad.net/ubuntu/+source/bash-completio

During the past few days, when using Ubuntu command lines, there are always some inexplicable spaces.

For example, $ ls/var

Under normal circumstances, $ ls/var/appears/

But now I have $ ls/var Space

Dude,/var is a directory. It is not a file and cannot be left blank.

This should be a problem with bash completion.

Cause of problem: https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/769866/comments/10

Unexpectedly, when writing a program on your own, you can also complete parameters in the linux environment.

The secret is in/etc/bash_completion.d.

Ubuntu 11.04, aka Natty Narwhal, was released on release L 28th and so naturally I chose to break my perfectly functioning laptop to see what was new. that "upgrade" button really needs to read something like, "download and install new software then spend a week scouring the internet for information and trying to fix all the shit that just broke. "But that's probably a little too verbose for the UX people.

What broke?

To be completely fair, most things did not break. it was mainly KDE (my default X session), that new Unity business, "classic" Gnome (not entirely broken, but severely wounded), and bash shell tab completion. or, in other words, just a number of the most important parts for actually "using" my computer to "do things. "I apologize for blowing things out of proportion.

I 've gotten KDE (and Gnome, but not Unity-it refuses to believe my hardware is sufficient to run it) back up and running now after deleting tons of old configuration files (. kde *,. gconf, selectively under. config... And a bunch of other stuff I 've forgotten) and also by accepting that the combination of Compiz + KDE is no longer usable and switching out Compiz for KDE's native window manager, KWin. I had originally ditched KWin because it didn't play nice (broken desktop effects and resource hogging and slow and crash-y) with fglrx (the radeon graphics driver .) KWin runs with direct rendering and GLSL shaders disabled (on my ATI Mobility Radeon HD 3650) and it's (mostly) not as good as Compiz + KDE used to be. but it is 90% as good and the best and only real current option.

About that bash completion...

And then there was the broken bash completion ( -Completion.) For example, typing" ls /et "Yielded" ls /etc "And not" ls /etc/(Note the extra space and lack of closing slash at the end.) Reinstalling bash-completion did not fix this problem for me. What did work was removing bash-completion, renaming /etc/bash_completion.d//etc/bash_completion.d.bak/, And then reinstalling bash-completion.


user@machine:~$sudo apt-get purge bash-completion
user@machine:~$sudo mv /etc/bash_completion.d /etc/bash_completion.d.bak
user@machine:~$sudo apt-get install bash-completion

After reinstalling bash-completion,/etc/bash_completion.d/Reappeared. IdiffEd the two directories and the new one had way more stuff so I justrm -rfEd the old one. I'm happy to say my bash completion is working again and I'm going to file this problem under's. 'For "solved ."

Conclusion

Well, that was fun! Looking forward to willinugly breaking my computer again in another 6 months! See you then!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.