Files
openide/plugins/terminal/resources
Konstantin Hudyakov d5fd6a6fd4 [terminal] IJPL-186897 Fix unintended switch of directories in Bash when posix mode is enabled
For some reason, when posix mode is enabled and no custom DEBUG trap is set, the result of `trap -p "DEBUG"` command that we use to get the initial DEBUG trap value is `trap -- - DEBUG`. So, we get the `-` string as the DEBUG trap. And execute this `-` every time together with the our custom DEBUG trap.
And, this `-` command actually switches the shell to the previous directory and prints directory name into the terminal.
Ignore this value if it is the original debug trap.

(cherry picked from commit 19ad6602291566e947dd81a4c32dce6e60fcb744)

IJ-CR-162886

GitOrigin-RevId: 43c0f60575e2a8c2b5738f6af6a0bdcd5b9bbfc6
2025-05-23 08:25:45 +00:00
..