diff --git a/doc_src/open.txt b/doc_src/open.txt index c81c3c9a1..7207fc172 100644 --- a/doc_src/open.txt +++ b/doc_src/open.txt @@ -9,6 +9,8 @@ open FILES... `open` opens a file in its default application, using the appropriate tool for the operating system. On GNU/Linux, this requires the common but optional `xdg-open` utility, from the `xdg-utils` package. +Note that this function will not be used if a command by this name exists (which is the case on macOS or Haiku). + \subsection open-example Example diff --git a/share/functions/open.fish b/share/functions/open.fish index 533b3df19..9eaa7eda6 100644 --- a/share/functions/open.fish +++ b/share/functions/open.fish @@ -3,7 +3,7 @@ # application for the file. # -if not test (uname) = Darwin +if not command -s open >/dev/null function open --description "Open file in default application" if count $argv >/dev/null switch $argv[1]