LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2009, 02:49 PM   #1
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Rep: Reputation: 19
Bash won't tab complete ANYTHING anymore :(


Hi.

I recently upgraded to ubuntu 9.10, and now Bash is broken

It will not tab-complete stuff it did before, such as apt-get install package names and common commands. it WILL however autocomplete directories. I'm thinking a PATH variable needs to be set

Can somone help?

Thanks

James
 
Old 11-06-2009, 03:04 PM   #2
tom4everitt
Member
 
Registered: Jan 2009
Location: Stockholm
Distribution: Fedora, Ubuntu, Mac OS X
Posts: 78

Rep: Reputation: 23
If its only apt-get thats broken, it might be as simple as running

Code:
sudo apt-get update
so it downloads the package lists.
 
Old 11-06-2009, 03:46 PM   #3
jkzfixme
Member
 
Registered: Sep 2006
Location: Orange County, NY
Distribution: Ubuntu, Solaris, Android
Posts: 329
Blog Entries: 21

Rep: Reputation: 52
To enable smart completion, edit your /etc/bash.bashrc file. Uncomment the following lines, by removing the # in the beginning of the lines:

#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi

you can also add the following lines to “.profile” or “.bashrc”:

# make bash autocomplete with up arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'

# make tab cycle through commands instead of listing
bind '"\t":menu-complete'

Regards,
JKZfixme

Last edited by jkzfixme; 11-06-2009 at 04:01 PM.
 
Old 11-07-2009, 03:59 AM   #4
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by jkzfixme View Post
To enable smart completion, edit your /etc/bash.bashrc file. Uncomment the following lines, by removing the # in the beginning of the lines:

#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi

you can also add the following lines to “.profile” or “.bashrc”:

# make bash autocomplete with up arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'

# make tab cycle through commands instead of listing
bind '"\t":menu-complete'

Regards,
JKZfixme
Thanks very very much for that; it works perfectly

Regards

James
 
Old 11-07-2009, 04:00 AM   #5
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by tom4everitt View Post
If its only apt-get thats broken, it might be as simple as running

Code:
sudo apt-get update
so it downloads the package lists.
No it was commands and apt-get. I do the update command about every hour out of very bad habit :P

Thankyou anyway

James
 
Old 11-08-2009, 04:04 PM   #6
tom4everitt
Member
 
Registered: Jan 2009
Location: Stockholm
Distribution: Fedora, Ubuntu, Mac OS X
Posts: 78

Rep: Reputation: 23
Okay, it was a shot in the dark :P

Quote:
Originally Posted by jamwaffles View Post
No it was commands and apt-get. I do the update command about every hour out of very bad habit :P

Thankyou anyway

James
 
Old 11-09-2009, 01:10 PM   #7
jamwaffles
Member
 
Registered: Mar 2008
Distribution: Ubuntu Lucid
Posts: 131

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by tom4everitt View Post
Okay, it was a shot in the dark :P
Lol nearly there. thanks for your suggestion anyhow

James
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tab does not auto-complete in terminal General Fedora 8 09-12-2013 01:48 AM
How to get tab auto complete in bash to scroll through all possible choices joeldick Linux - Software 5 04-06-2011 04:27 PM
Bash script using tab complete sadarax Programming 6 01-30-2007 08:21 PM
Shells & Tab complete. sph90457 Solaris / OpenSolaris 1 05-19-2005 03:59 PM
tab complete Frustin AIX 4 07-19-2004 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration