Results 1 to 6 of 6

Thread: Bash-completion not working as expected for directories

  1. #1
    Join Date
    Jan 2009
    Beans
    1

    Bash-completion not working as expected for directories

    Hi Forum,

    I have a problem with the bash-completion for directories.
    I am running Ubuntu 8.10, bash 3.2.39 and bash_completion 1.872

    When I tab-expand a cd command I do not get the trailing slash
    e.g.
    cd Down
    <Tab>
    -> cd Downloads
    I would expect -> cd Downloads/

    The same holds for environment variables
    cd $HOM
    <Tab>
    -> cd $HOME
    instead of $HOME/

    Furthermore, I have a directroy with a space in the name, the Tab Completion doesn't work.
    Directory A B is expended not like "A\ B", but "A B".

    Does anyone have an idea how to solve these problem? Is this a known issue? I found some similar links, but not the exact problem. Does anyone have a suggestions how I should edit my bash_completion or what I should do?

    Cheers,
    Fabdog

  2. #2
    Join Date
    Apr 2008
    Beans
    7

    Re: Bash-completion not working as expected for directories


  3. #3
    Join Date
    Feb 2008
    Beans
    5,636

    Re: Bash-completion not working as expected for directories

    This isn't a problem at all
    Code:
    cd Desktop
    is the same as
    Code:
    cd Desktop/
    and
    Code:
    cd A\ B
    is the same as
    Code:
    cd "A B"

  4. #4
    Join Date
    Sep 2009
    Beans
    2

    Re: Bash-completion not working as expected for directories

    That IS a problem.

    Of course
    Code:
    cd Desktop
    is the same as
    Code:
    cd Desktop/
    But the problem only appears when you want to go deeper in the directory some more levels.
    If you issue
    Code:
    cd Desk<tab>
    , it will do
    Code:
    "cd Desktop "
    (notice the extra space). Now try to append something more to that path. It won't work.
    The decision of using completion that way was just wrong.

    anoxi's solution solves it.

  5. #5
    Join Date
    Sep 2009
    Beans
    2

    Re: Bash-completion not working as expected for directories

    Actually the problem lies elsewhere.

    See

    http://forums.adobe.com/thread/745833

    and

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

    Just remove /etc/bash_completion.d/acroread.sh and it'll all be fine. Although it's a temporary solution, it's the least intrusive i've seen so far.

    Cheers.

  6. #6
    Join Date
    Sep 2007
    Location
    Seattle, WA, USA
    Beans
    6
    Distro
    Ubuntu Karmic Koala (testing)

    Re: Bash-completion not working as expected for directories

    Confirmed, that was acroread, i.e. from Adobbe's site
    adobrereader-enu:i386, v 9.4.7

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
  •