jamestalmage / supports-hyperlinks

Detect whether a terminal emulator supports hyperlinks
MIT License
54 stars 13 forks source link

Avoid nested if and duplicate return #1

Closed fregante closed 6 years ago

jamestalmage commented 6 years ago

I think it's easier to understand the original way.

Also, there's a distinct possibility that terminals based on the VTE might set this environment variable, but not actually support hyperlinks (https://github.com/gnunn1/tilix/issues/904). We're almost certainly going to end up with additional conditions inside that if block, so I think nesting is inevitable.