Conversation
|
I'm curious about the situation where this matters during the test process. In my understanding, we initialize the Bash sessions in our test with |
| and not re.search( | ||
| r"^[-+](_|PPID|BASH_REMATCH|(BASH_)?LINENO)=", | ||
| # _omp_*: https://ohmyposh.dev | ||
| r"^[-+](_|PPID|BASH_REMATCH|(BASH_)?LINENO|_omp_.+)=", |
There was a problem hiding this comment.
Also, to reduce the size of the output, I think environment variables are better to be filtered in _comp__test_get_env (test/config/bashrc):
bash-completion/test/config/bashrc
Line 79 in c4a8fd0
_, PPID, BASH_REMATCH, BASH_LINENO, and LINENO are excluded in conftest.py because they are special variables that cannot be unset. Technically, BASH_REMATCH can be unset in recent versions of Bash, but it can't in Bash < 5.1.
There was a problem hiding this comment.
Re the original question, TBH I did not research the "why" nor can I answer it offhand. It's just something I saw when doing a pytest test/t/unit/test_unit_compgen_filedir_xspec.py while having the branch related to that change checked out and oh-my-posh active, every time. I can't reproduce right now on main though, so drafting for now and will reopen if I see it again.
There was a problem hiding this comment.
OK, I know that apparently strange things sometimes happen. There could be a specific setup that OMP affects the test sessions, though I don't have an idea for now.
Ref https://ohmyposh.dev,
https://github.com/JanDeDobbeleer/oh-my-posh/blob/572c99b2ec6a57a18d4a911cf8d577805002811e/src/shell/scripts/omp.bash#L11-L18