Results 1 to 8 of 8

Thread: TAB Completion in BASH - Sudo Issues

  1. #1
    Join Date
    Apr 2008
    Location
    Galway, Ireland
    Beans
    39
    Distro
    Ubuntu Jaunty Jackalope (testing)

    TAB Completion in BASH - Sudo Issues

    Okay I've installed a fresh version of 8.10, which I upgraded to the 9.04 alpha. All seems well but when I am using the terminal I run into an issue.

    When I type in a few letters of an app and hit the TAB button twice, I get the usual TAB completion

    Code:
    richey@richey-desktop:~$ open
    open        openoffice  openssl     openvt
    All well and good, however, if I place a sudo command before the letters "open", tab completion refuses to work.
    Code:
    richey@richey-desktop:~$ sudo open
    I have ubuntu 8.10 on another partition and that runs fine with tab completion running normal when sudo is used.

    Any pointers?

  2. #2
    Join Date
    Dec 2007
    Beans
    373
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: TAB Completion in BASH - Sudo Issues

    There is most likely something broken in the bash-completion package. More specifically in /etc/bash_completion which governs the command completion. There is a section of that script that controls how bash completes commands preceded by sudo. Sounds like you have uncovered a bug which you should probably report.
    "Mark as Solved" = "Effective Support"

  3. #3
    Join Date
    Apr 2008
    Location
    Galway, Ireland
    Beans
    39
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: TAB Completion in BASH - Sudo Issues

    I'll report it. Thanks

  4. #4
    Join Date
    Apr 2007
    Beans
    2,953
    Distro
    Ubuntu

    Re: TAB Completion in BASH - Sudo Issues

    Does it work when you press <tab> twice?

  5. #5
    Join Date
    Apr 2008
    Location
    Galway, Ireland
    Beans
    39
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: TAB Completion in BASH - Sudo Issues

    No, but tabbing twice works using a non sudo command.

    For the record I've tried completely uninstalling then installing bash and bash-completion in synaptic, but with no success.

  6. #6
    Join Date
    Mar 2007
    Location
    127.0.0.1
    Beans
    507
    Distro
    Ubuntu Development Release

    Re: TAB Completion in BASH - Sudo Issues

    Quote Originally Posted by RealPSL View Post
    There is most likely something broken in the bash-completion package. More specifically in /etc/bash_completion which governs the command completion. There is a section of that script that controls how bash completes commands preceded by sudo. Sounds like you have uncovered a bug which you should probably report.
    I doubt its a bug. First check that bash_completion is properly configured. Are you using a local or system wide bashrc-file? I.e. is there a .bashrc or are you only using the /etc/bash.bashrc?

    Either way check that one or both of these files are properly configured. That is, look for the lines with:

    Code:
    if [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
    fi
    These lines should be enabled, i.e. no "#" at the start of each line.

    I would start by checking that before submitting a bug report but I suspect its only that.

    PS. You might have to reboot or reload bash in order for it to work
    Registered user267386
    Answear a post if you got time or if you just want to avoid doing something else...
    Underestimated help just as this little friend.
    Don't forget to close the threads once answered.

  7. #7
    Join Date
    Feb 2007
    Beans
    34

    Re: TAB Completion in BASH - Sudo Issues

    Thanks a lot...

  8. #8
    Join Date
    Dec 2009
    Beans
    1

    Re: TAB Completion in BASH - Sudo Issues

    Same problem, same solution.
    Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •