On 1/31/20 11:54 PM, Segher Boessenkool wrote:
> Hi!
>
> Thanks for working on this.
>
> On Fri, Jan 31, 2020 at 04:59:02PM +0000, Bernd Edlinger wrote:
>> I will try to improve the patch a bit, and hope you are gonna like
>> it. I agree that this feature is fine, and should be enabled by
>> default, and just if it is positively clear that it won't work,
>> disabled in the auto mode.
>
> Why does it not ask the terminfo, instead of only disabling this for
> "dumb"? It should disable it for *most* terminals! The one I care
Unfortunately I was told that terminfo is not willing to support URLs
either, and it need to be administered centrally, which is per definition
an impossible task...
> about most, which caused me to open PR93168, is TERM=screen (which is
> what tmux uses), so at least exclude that one? And doing all this
Definitely, if the situation with tmux is like xfce4-terminal (reportedly
the 0.8 version switched to a fixed VTE, which makes the URLs invisible,
but the URL feature request is pending sine 2017, with no activity whatsoever),
then detecting that and disabling the URLs until they finally implement
the URLs is straight forward. I can add that to my patch if you confirm,
the right detection logic:
>From
>https://unix.stackexchange.com/questions/10689/how-can-i-tell-if-im-in-a-tmux-session-from-a-bash-script
I read the safest way to find out if you are in a tmux session, is
to look for TERM=screen and TMUX is set.
Is that the case for your environment?
Note that it is well possible that this environment values are
not preserved in a ssh session, but nobody is perfect.
> beeping and screen-corrupting stuff for everything that sets TERM=xterm
> is a bad idea imnsho.
>
>> Since I have seen much garbage from the URLs in the xfce4-terminal 0.6.3
>> admittedly an old Ubuntu installation, but still in LTS status,
>> and no attempt from the xfc4-terminal to _ever_ implement URLs,
>
> This is true for *most* terminal emulators.
>
Sadly, I would not do this if there is a chance that someone looses a
working feature, so I was told that a more aggressive approach would
"be straight harmful to the current state of things
(i.e. hyperlinks at least not causing any problem, plus working
out of the box wherever supported, for the vast majority of people)"
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#gistcomment-3160953
So I would try to detect known terminals which are so buggy that they
print garbage instead of silently ignoring the URL escapes AND
which may or may not have fixed the visual glitches but have not plan
to implement URLs at all. Once they implement URLs it would be nice if they
do something like set a TERM_URLS=yes so we know for sure, that the feature is
positively available, for instance.
> I have nothing against this feature, I just wish it wouldn't annoy me
> on pretty much every system I use. None of which use "TERM=dumb", but
> none of which use "TERM=fancy-pants-term-v42" either. (Did anyone ever
> use "dumb", anyway?)
>
The dumb thing was old code, I only took the freedom to document it ;-)
Bernd.
>
> Segher
>