Skip to content

Conversation

@akinomyoga
Copy link
Collaborator

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 test/config/bashrc, where we do not source external settings. Is there a case where OMP affects the test Bash sessions (e.g., through exported functions, BASH_ENV, ENV & POSIXLY_CORRECT, etc., though I'm not sure if they can actually be used to inject settings in the test sessions)? Or is there a future plan to load external settings during the test process?

and not re.search(
r"^[-+](_|PPID|BASH_REMATCH|(BASH_)?LINENO)=",
# _omp_*: https://ohmyposh.dev
r"^[-+](_|PPID|BASH_REMATCH|(BASH_)?LINENO|_omp_.+)=",
Copy link
Collaborator

@akinomyoga akinomyoga Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

unset -v $(compgen -W '"${!_comp_@}"' -X '!_comp_@(_test_+([0-9])_*|*_mut_*)')

_, 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.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@scop scop marked this pull request as draft January 26, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants