#161 Pressing Tab without input hangs

closed
nobody
MSYS (18)
5
2012-11-06
2012-11-06
Orgad Shaneh
No

Open msys, press Tab. Nothing happens.

Press some keys, still nothing happens.

Press Ctrl+C. A new prompt will appear and the previously pressed keys will be displayed there.

Discussion

  • Earnie Boyd
    Earnie Boyd
    2012-11-06

    • labels: 380073 --> MSYS
     
  • Earnie Boyd
    Earnie Boyd
    2012-11-06

    • status: open --> closed
     
  • Earnie Boyd
    Earnie Boyd
    2012-11-06

    Using tab completion on the beginning of a line will search through all of PATH which is an expensive operation. Eventually it would have either aborted to to resource limitation or returned with a count of tens of thousands of possible entries and asked if you wanted to continue. Your pressing ctrl-c aborts the tab completion allowing the subsequent characters to then be echoed. This works as designed, no bug is in effect other than the bug of the user expectation of immediate response.

     
  • Orgad Shaneh
    Orgad Shaneh
    2012-11-06

    Well, on linux pressing tab (even twice) with empty input just does nothing. That's what I'd expect it to do...

     
  • Earnie Boyd
    Earnie Boyd
    2012-11-06

    May be a difference in bash version.
    May be a difference in the ~/.inputrc file.

     
  • Orgad Shaneh
    Orgad Shaneh
    2012-11-06

    I just tried with 3.2.25 on linux, it does offer completions, though only after pressing tab twice.

     
  • Orgad Shaneh
    Orgad Shaneh
    2012-11-06

    With bash 4.2.36 (debian wheezy) it doesn't offer completions at all.

     
  • Keith Marshall
    Keith Marshall
    2012-11-06

    I've been running various linux distros, since the days of Red Hat 6; I'm sure I recall behaviour similar to that which you're reporting for MSYS, with a number of them.

    The tab completion features of bash are highly configurable, and different distros configure it differently; even today, I observe different behaviour between Linux Mint Debian, (with bash-4.2.36), and the Ubuntu based Linux Mint variant I was using previously, (don't know right now what bash version that used). You're welcome to review the bash manpage, and offer configuration patches for MSYS bash-3.1.17, but its unlikely that any core MSYS developer will pursue this without a significant level of such user participation.

     
  • Keith Marshall
    Keith Marshall
    2012-11-06

    FWIW, and further to my earlier comment, I just tried your experiment with MSYS bash-3.1.17, running in VirtualBox on my LinuxMint Debian host, under a very basic -- i.e. unpolluted -- WinXP install; I am NOT reproducing the behaviour you report!

    If, at the shell prompt, I immediately hit <TAB>abc, I see the abc echoed after a couple of seconds. OTOH, if I hit <TAB><TAB> at the prompt, after a couple of seconds I see an auxiliary prompt of "display all 1973 possibilities? (y or n)". This is just tab completion working as expected.