Results 1 to 7 of 7

Thread: gksudo tab completion

  1. #1
    Join Date
    Apr 2006
    Beans
    348
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    [Solved] gksudo tab completion

    Hey,
    When using tab completion it works for sudo but not gksudo. For instance.
    Code:
    sudo nau <tab>
    Brings up sudo nautilus, but
    Code:
    gksudo nau <tab>
    Brings up nothing. I guess it is something to do with bashrc but not too sure. Thanks in advance..
    Last edited by bacardiandwatermelon; June 6th, 2009 at 04:41 PM.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Beans
    1,133
    Distro
    Ubuntu Development Release

    Re: gksudo tab completion

    Hi,

    open up Synaptic and see what version of bash-completion you have, and see if it's upgradeable. Check and see if you have any available updates.

    I found a bug report on it that says that this was fixed in version 1:1.0-2.

    It's working fine in the Karmic Alpha...

    Here is a link to the bug report, which also contains a patch for it:

    https://bugs.launchpad.net/ubuntu/+s...on/+bug/239080

    Regards,

    Didius

    PS Next time I'm in my Jaunty install, I'll try to remember to check it there and report back...
    BootInfoScript - Thanks, meierfra & caljohnsmith

    Remastersys - Thanks, Fragadelic

  3. #3
    Join Date
    Apr 2007
    Beans
    402
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: gksudo tab completion

    Where is the patch? All I see is the output of a diff command.

  4. #4
    Join Date
    Apr 2006
    Beans
    348
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: gksudo tab completion

    Thanks for putting me in the right direction. It worked perfectly. I saved the patch below as patch.diff
    Code:
    diff -u /etc/bash_completion /tmp/buffer-content-66310Oi
    --- /etc/bash_completion    2008-04-08 10:29:11.000000000 -0400
    +++ /tmp/buffer-content-66310Oi    2008-06-10 14:39:20.000000000 -0400
    @@ -3259,7 +3259,7 @@
     {
      PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command $1 $2 $3
     }
    -complete -F _root_command $filenames sudo fakeroot really
    +complete -F _root_command $filenames sudo fakeroot really gksudo
      # ant(1) completion
     #
    and then patched it by running
    Code:
    sudo patch -p0 < patch.diff
    Logged out and logged back in. Thanks again

  5. #5
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: gksudo tab completion

    as a quick fix add
    Code:
    complete -cf gksu
    complete -cf gksudo
    to the .bashrc file

    EDIT: too late

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Beans
    1,133
    Distro
    Ubuntu Development Release

    Re: gksudo tab completion

    Quote Originally Posted by bacardiandwatermelon View Post
    Thanks for putting me in the right direction. It worked perfectly. I saved the patch below as patch.diff
    <snip>
    Logged out and logged back in. Thanks again
    My pleasure!

    I just hope Volt9000 sees it - I just got back to the PC and saw his post.

    Regards,

    Didius
    BootInfoScript - Thanks, meierfra & caljohnsmith

    Remastersys - Thanks, Fragadelic

  7. #7
    Join Date
    Apr 2007
    Beans
    402
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: gksudo tab completion

    Yes I saw it, thanks Didius!

Tags for this Thread

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
  •