Apply wsl patch from issue #230
Which was replaced with command -v at this opportunity, as which is a nonstandard utility.
Thanks Najib Idrissi
I've also broken out URL recognition into its own function to make that part easier to maintain.
Fixes: #230 (closed)
Edited by Slatian