Created attachment 41851 [details] [review] Patch $ cat > -test.txt test ^D $ xdg-open -test.txt xdg-open: unexpected option '-test.txt' Try 'xdg-open --help' for more information. $ xdg-open -- -test.txt xdg-open: unexpected option '--' Try 'xdg-open --help' for more information. Most applications offer the -- flag to deactivate the handling of options and allow the application to handle file names beginning with -. I wrote a patch that adds support for -- to xdg-open. I added a test case and it worked for me with kde-open (should also work with exo-open and gnome. Haven't tried the generic/lxde stuff). The patch does not support file names "--help" and so on because the code that handles those options is auto generated and not aware of --. I wasn't sure how to fix that and it's probably a very uncommon use case.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/40.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.