Earlier quoted context omitted.
Xdg-open
Am I the only one who utterly loathes this tool? Seriously, it maintains (among other things, yes) the mapping from filename extensions to the path of the binary that should be used to open them. It's a map : extension -> path. WhyTF does MIME have to get dragged into this? Why can't I just say "*.foo is opened with /usr/bin/foobalize"? Why must I suffer the agony of trawling the interwebs to find out that blartz.foo…
I've once had xdg-open be absolutely broken on my machine, scanning all of my $HOME because of a file with a space character in it [1]. Any attempt to use xdg-open would pin a CPU core for 100% while bash/find recursively traversed millions of files because of missing quote characters in a shell script. Truly the pinnacle of software engineering.
I wouldn't be surprised if serious security bugs lurked somewhere in it, exploitable by web pages attempting to open maliciously crafted protocol URLs.
[1] - https://github.com/freedesktop/xdg-utils/commit/9816ebb3e6fd...