Menu

#31 Bash completion do not work correctly.

1.0
open
nobody
None
2015-01-23
2014-04-11
LiTuX
No

I met this issue several months ago, I thought some update may solve it, but is still there.

  1. TAB directly in bash gives a bad array subscript exception. This is a known issue with bash-completion, can be fixed by :710s/-eq/-le/g according to https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1289597

  2. some executables can not be completed. For example, I have some small programs (foo, bar, baz) in a folder, say C:\bin\, and is added to the PATH variable. I can call those programs by their name both in cmd and bash, but in bash, some of them can not be completed by TAB after some letter (f<TAB> list foo, but b<TAB> gives nothing. ba<TAB> is empty, too).

  3. Let's say, for example, there's a foo.sh in the current folder. Because . is not in PATH, we need to type ./foo.sh to run it. Normally, after ./, <TAB> should show something. But now <TAB> after ./ complete to the subfolder (if any) but not foo.sh; ./f then <TAB> still gives nothing, sometimes ./foo or even ./foo.sh can not be completed.

Discussion

  • Alexx83

    Alexx83 - 2014-04-11

    I will add patch from ubuntu. Other issues I will see when have free time.

     
  • Alexx83

    Alexx83 - 2014-04-11

    Try update system and see what issues is still present for you.

     
  • LiTuX

    LiTuX - 2014-04-11

    So the updated version only modified -eq?

    Only the first issue I've metioned is solved. Completion on executables are still not correct.

     
  • Alexx83

    Alexx83 - 2014-04-11

    Not only -eq. I'm also add other patch. Try it.

     
    • LiTuX

      LiTuX - 2014-04-11

      Yes, I've updated the system (pacman -Syu), the ./foo.sh, bar/baz completion problem is still there.

      Does it because that I have too much programs available in the PATH?

       
  • Alexx83

    Alexx83 - 2014-04-11

    Need more to investigate...

     
  • LiTuX

    LiTuX - 2014-04-15

    Here are two screenshots before and after update. Because bash-completion do not update often, I think this should be a issue of bash.

    Before update (This is msys32 I've installed several months ago, so its packages were earlier versions), b<TAB> will show so much items, but after a system upgrade, b<TAB> shows much fewer. Then I tried with bootsec, bo, boo, boot followed with <TAB> gives nothing, to get bootsec as a result, I have to type boots<TAB>. See attachments for details.

     
  • Alexx83

    Alexx83 - 2014-04-15

    Try update bash/readline to latest and write about results.

     
  • LiTuX

    LiTuX - 2014-04-16

    Issue not solved. The completion result is the same as before. :(

     
  • LiTuX

    LiTuX - 2014-04-22

    I don't know if this helps or not, but this issue does not exist in some elder version of bash. Sometimes the completion shows such an error message (while it can complete something):

    [main] bash 832 sig_send: error sending signal -66, pipe handle 0x340, nb 136, packsize 0, Win32 error 0

    This does not happen everytime, and I don't know how to reproduce it, you may try different kinds of completions and it might come out sometimes. BTW, because I usually use ConEmu instead of MinTTY, during the time I use MinTTY, I never meet this error message.

     

    Last edit: LiTuX 2014-04-22
  • Alexx83

    Alexx83 - 2014-12-02

    Issue still present?

     
  • Jesse Johnson

    Jesse Johnson - 2015-01-23

    Not sure if I should open a new ticket or update this one, but bash completion does not work with pacman like it does in Arch.