redis / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
http://redis.io
Other
66.52k stars 23.74k forks source link

[BUG] Clicking URL with period ( . ) at end of the URL in WSL opens the URL with period in browser #13360

Closed thisisjaymehta closed 2 months ago

thisisjaymehta commented 3 months ago

Describe the bug

When clicking URL from below message in WSL2 Ubuntu:

204972:C 21 Jun 2024 21:49:20.946 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

CMD Screenshot

It opens the URL with period at end in browser:

Browser Screeshot

To reproduce

Use redis-server --daemonize yes in WSL2 Ubuntu

Expected behavior

It should open https://github.com/jemalloc/jemalloc/issues/1328 instead of https://github.com/jemalloc/jemalloc/issues/1328.

Additional information

Its probably has to do with how Windows Terminal detects links. One way to fix this would be to add space before period in /src/syscheck.c file where this message is defined. I am not sure if it goes against the style guidelines or its not to be fixed from redis side but from Windows Terminal.

sundb commented 3 months ago

@thisisjaymehta thanks, but this is a issue of parsing a link in window terminal, for Redis we should ouput a correct sentence, not an extra in the mid. on the other hand, we can copy the link to web browser.

thisisjaymehta commented 3 months ago

But since a period is a valid URL character, it won't be possible for Terminal to distinguish if the period belongs to the sentence or the URL.

In that case, it's advisable to rewrite the sentence such that the URL is not at the end of the sentence, as advised here.

Possible rewrite could be: Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328 for more details.

sundb commented 3 months ago

@thisisjaymehta actually, it only happened in windows terminal, it works in ubuntu terminal.

thisisjaymehta commented 3 months ago

True, only happens in Windows Terminal.