Hi Oğuz On Sun, 21 Jan 2024 at 03:20, Oğuz <oguzismailuy...@gmail.com> wrote:
> $ echo echo foo bar >s > $ chmod +x s > You seem to have created an invalid executable. It seems that scripts without a #! can only be run with help from the debugger library; for example, this is what I get when I run up bash_5.1.3p47 (built from commit f3a35a2d601a55f337f8ca02a541f8c033682247): <pre> $ cat a #!/bin/sh echo A $ cat b ==> b <== echo B $ ./a A $ ./b ./b: /home/martin/lib/bash/f3a35a2d601a55f337f8ca02a541f8c033682247/share/bashdb/bashdb-main.inc: No such file or directory ./b: warning: cannot start debugger; debugging mode disabled B </pre> So I'm guessing that if the debugger is triggered in the middle of a completion function, it's likely to get stuck. (Maybe it's writing a prompt to stdout?) I get the same result for bash_5.0.0rc1 (built from commit f250956cb2a8dca13fc0242affc225f9d6983604) bash_4.4.23p49 (build from commit 64447609994bfddeef1061948022c074093e9a9f) bash_4.4.0p51 (built from commit a0c0a00fc419b7bc08202a79134fcd5bc0427071) Not exhibited by bash_4.3.x -Martin