As of BBEdit version 13.5.2 (415056, 64-bit Intel, sandboxed), I observe a similar behavior.
When a #! script is executed, if the "Unix Script Output.log" window is not open, BBEdit will open it and bring it to the front.
But if the "Unix Script Output.log" window was already open, BBEdit won't bring it to the front.
Might be related to this change.
================================================================================
Version 13.2 (415007) (2020-08-18)
Additions
---------
o (none in this build)
Changes
-------
• [NFR] [DOC] Made a change to #! script output behavior as
follows: if a script produces no output, the log will so note.
However, if the log is *not* open, BBEdit will not open it. If
the log *is* open, BBEdit will update the log's window, but will
not bring it to the front.
...
================================================================================
A (damn slow) workaround is to use an osascript call at the end of your script to force BBEdit to bring the window to the front:
#!/bin/bash
ls -al . ;
/usr/bin/osascript <<END
tell application "BBEdit"
try
tell window "Unix Script Output.log"
activate
end tell
end try
end tell
END
Best regard.
Jean Jourdain