nunomaduro / termwind

🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.
MIT License
2.27k stars 76 forks source link

a href doesn't work in Windows 10 console and under wsl #173

Closed 2rkmen closed 1 year ago

2rkmen commented 1 year ago

a href doesn't work in Windows 10 console and under wsl. Is it working on a mac or Linux? Is there some solution to avoid this problem?

xiCO2k commented 1 year ago

can you share a printscreen? and the HTML provided?

2rkmen commented 1 year ago

i use it in laravel zero

    public function handle()
    {
        render(<<<'HTML'
            <p>
                This is a CLI app built with Termwind. <a href="/">Click here to open</a>
            </p>
        HTML);
    }

image

xiCO2k commented 1 year ago

It maybe a problem with symfony/console, can you try this, and let me know if it works?

use Symfony\Component\Console\Output\ConsoleOutput;

(new ConsoleOutput())->write('<href=http://google.pt>Test</>');
2rkmen commented 1 year ago

no. same situation. Links are not clickable on windows command line and wsl

I think this feature not available under windows. https://stackoverflow.com/questions/62375976/windows-terminal-clickable-urls

Is it work on linux?

withinboredom commented 1 year ago

Whether links are clickable depends on the terminal application you are using. In Windows, if you are using Terminal, you have to ctrl-click to open a link in the browser. On Linux, it is the same with Tilex or most terminal applications.

If you are using the old style terminal in windows, it doesn't support opening links via clicks IIRC. I don't even know how to get to it anymore, so I can't easily test it.

2rkmen commented 1 year ago

thank you. It works on new terminal