auto-complete in gnome-terminal dont work (<TAB>)

Asked by schiebe

Binary package hint: gnome-terminal

Hello,

if i would like run a command after a another command (example: sudo apt-g <TAB>) auto-complete dont work.

apt-g<TAB> work!
sudo apt-g <TAB> dont work!

Description: Ubuntu hardy (development branch)
Release: 8.04

gnome-terminal:
  Installiert:2.22.0-0ubuntu1
  Mögliche Pakete:2.22.0-0ubuntu1
  Versions-Tabelle:
 *** 2.22.0-0ubuntu1 0
        500 http://de.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
Architecture: i386
Date: Mon Mar 24 11:52:03 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/gnome-terminal
NonfreeKernelModules: fcpci
Package: gnome-terminal 2.22.0-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-terminal
Uname: Linux 2.6.24-12-generic i686

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
schiebe (schiebe) said :
#1
Revision history for this message
Pedro Villavicencio (pedro) said :
#2

Thank you for your comments. This does not appear to be a bug report and we are closing it. We appreciate the difficulties you are facing, but it would make more sense to raise your question in the support tracker. https://answers.launchpad.net/ubuntu

Revision history for this message
Bhavani Shankar (bhavi) said :
#3

Hello

If you want to execute one command after an other use &&

ex sudo apt-get install vlc && sudo apt-get install xmms

will install vlc and xmms at one go..

Next, Autocomplete...

Run this command in your shell to get this behaviour for that shell only.

bind '"\C-i": menu-complete'

If you like how that works, then add that command to your ~/.bashrc file so that future shells will use that behaviour too.

Regards

Bhavani Shankar.

Revision history for this message
schiebe (schiebe) said :
#4

Hello,

thank you for your explanation, but it dont really fix the problem.

I run schiebe@ubuntu:~$ bind '"\C-i": menu-complete'

After that, i can switch the different commands bei pressing TAB: su -> sudo -> suedit -> an so on

But the problem is not solved.

On Xubuntu 7.04 it works as below:

1) sud + TAB = sudo
2) sudo apt-g + TAB = sudo apt-get

On Hardy Beta it works:

1) sud + TAB = sudo
2) sudo apt-g + TAB = nothing happens

Regards

Tobias

Revision history for this message
Bhavani Shankar (bhavi) said :
#5

Hello:

you have to uncomment the following inside the /etc/bash.bashrc file:

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Note:

As a tip: If any of the post here answers your question here please click " This solved my problem " Button on the RHS bottom of the answer post.. Or if you are using an email interface please click the link below ' If this answers your question " or something similar in the post of the answer which solved your problem

Regards

Bhavani Shankar.

Revision history for this message
schiebe (schiebe) said :
#6

Thanks Bhavani Shankar, that solved my question.

Revision history for this message
schiebe (schiebe) said :
#7

Okay, Bhavani's "fix" dont really works..

The problem was, that the program "bash-completion" was not installed by default! Bug?

Revision history for this message
Bhavani Shankar (bhavi) said :
#8

Hello :

You can try to install bash completion package..

sudo apt-get install bash-completion

Or, if it is installed you can remove the package

sudo apt-get remove bash-completion

and reinstall the package again using the above command..

and it should work...

Regards

Bhavani Shankar.

Revision history for this message
Jim Hutchinson (jphutch) said :
#9

I'm thinking that this is a bug. I can recreate it exactly. With sudo in the command tab completion does not work. This is a regression from 7.10 in which it did work. I think the bug should be reopened.

Revision history for this message
schiebe (schiebe) said :
#10

The bug/problem is, that the bash-completion-package was not installed by the default (Beta 1) installation.
After i installed the package manually, everthiny work as normal.

Regards

Revision history for this message
Jim Hutchinson (jphutch) said :
#11

I'm glad that fixed it for you, but I installed the bash-completion package and I still see the same issue with sudo commands.

Revision history for this message
Sidarth Dasari (sirsid) said :
#12

Im getting the same problem as well, has anybody opened a bug report yet? If not I will

Revision history for this message
sidrit (sidrit) said :
#13

actually, it's not just with sudo.
it's basically from the 2nd comman on-

ex: apt-get install ....

apt-get will complete fine. install won't.

Revision history for this message
sidrit (sidrit) said :
#14

ah, forgot.
installing bash-completion and rebooting does the trick just fine.

thnx guys.

Can you help with this problem?

Provide an answer of your own, or ask schiebe for more information if necessary.

To post a message you must log in.