Apparently ANSI color escaping breaks when setting shopt -s nullglob. Not necessarily an issue with this codebase per se, in fact it's probably not an option most bash users should set unless they're really adamant about it. All the same, I figure others may run into the same issue I did, and so find this tidbit of information useful.
With only nullglob set, colors don't work, except for background jobs icon in prompt_status(). With both nullglob and failglob set, things are rather peculiar... A number of globs fail and no colors are in the prompt initially, but with DEBUG=1, prompt colors seem to work (mostly) and less globs fail. Also, the contents of $PR are not as you'd likely expect with DEBUG=1, when both {null,fail}glob are set vs just nullglob. I would spend more time on this if I had it right now. Might return with a pull-request, if I figure out a fix for this, after my semester settles down.
Apparently ANSI color escaping breaks when setting
shopt -s nullglob
. Not necessarily an issue with this codebase per se, in fact it's probably not an option most bash users should set unless they're really adamant about it. All the same, I figure others may run into the same issue I did, and so find this tidbit of information useful.See: Why is nullglob not default? for why it's generally a bad idea to set this option in bash...
Another oddity I noticed: try running the following in an interactive shell.
With only
nullglob
set, colors don't work, except for background jobs icon inprompt_status()
. With bothnullglob
andfailglob
set, things are rather peculiar... A number of globs fail and no colors are in the prompt initially, but withDEBUG=1
, prompt colors seem to work (mostly) and less globs fail. Also, the contents of$PR
are not as you'd likely expect withDEBUG=1
, when both{null,fail}glob
are set vs justnullglob
. I would spend more time on this if I had it right now. Might return with a pull-request, if I figure out a fix for this, after my semester settles down.