8000 [Console] Hyperlinks broken on Konsole and PhpStorm terminal · Issue #31809 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Console] Hyperlinks broken on Konsole and PhpStorm terminal #31809
Closed
@belinde

Description

@belinde

Symfony version(s) affected: 4.3.0

Description
On Konsole and Yakuake the visualization of <href> tag is broken, and the output is shown enclosed by backslashes.
On PhpStorm terminal the output "crashes": at the first escape sequence the terminal stops printing the text, but the execution terminates smoothly.
On the same machine (Kubuntu Disco Dingo) XTerm and system console work well, ignoring the unrecognized escape sequences.

How to reproduce
Just run a command who outputs links. For me it was a simple bin/console debug:router in a Symfony Framework project, as I integrated the source linking to PhpStorm.

Possible Solution
I've debugged all the way and found that the check for unsupported terminal emulators is on line 189 of Formatter/OutputFormatterStile.php:

if (null === $this->handlesHrefGracefully) {
    $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR');
}

I understand thas is the correct point to work on, but I really don't know anything about terminal emulators. If someone points me in the correct direction I can create a pull request.

Additional context
The output on PhpStorm terminal:
image

The output on a Yakuake terminal (same engine of Konsole); cut because long output:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0