If you see a highlighted command in the Terminal, do not execute it right away. Instead, press Ctrl+Enter (for Windows and Linux) / ⌘↩ (for Mac) to activate the corresponding IDE feature.

Smart command execution highlighting for git log in the terminal

For example, try git log to view the Log tab of the Git tool window or diff with the names of files to open them in the diff viewer.