svenstaro / miniserve

🌟 For when you really just want to serve some files over HTTP right now!
MIT License
5.95k stars 289 forks source link

Remove trailing colon #1440

Closed QuarticCat closed 1 month ago

QuarticCat commented 2 months ago

For some reason, Konsole mistakenly include the tailing colon into the detected URL. See the screenshot:

image

Maybe I should report to Konsole? I have no idea if this is a valid URL.

And possibly we can add a newline after QR codes for better readability.

I can submit a PR if you accept that.

svenstaro commented 2 months ago

And possibly we can add a newline after QR codes for better readability.

Happy for a PR for that.

I don't really have an idea where the : comes from, though. Does it not happen on other terminals?

Atreyagaurav commented 1 month ago

This is not a problem in terminator.

This is in main.rs 264

                println!("QR code for {}:", url.green().bold());
                qr.print();

Since : comes after the url and is separated by ANSI escape sequences, there should be good demarcation for the terminal to understand. Although double-clicking on terminator does include : as part of the word. So maybe that's the problem with konsole. It's easy enough to fix.

QuarticCat commented 1 month ago

@Atreyagaurav Thanks for the reply. I found that Konsole doesn't have consistent behavior on this issue. It's more likely Konsole's fault. I've reported there and will close this issue. Sorry for bothering.