diff --git a/share/functions/open.fish b/share/functions/open.fish index 442bdf568..08c1942ad 100644 --- a/share/functions/open.fish +++ b/share/functions/open.fish @@ -24,14 +24,7 @@ if not command -sq open end else if type -q -f xdg-open for i in $argv - # In the "generic" path where it doesn't use a helper utility, - # xdg-open fails to fork off, so it blocks the terminal. - xdg-open $i & - # Note: We *need* to pass $last_pid, or it will disown the last *existing* job. - # In case xdg-open forks, that would be whatever else the user has backgrounded. - # - # Yes, this has a (hopefully theoretical) race of the PID being recycled. - disown $last_pid 2>/dev/null + xdg-open $i end else echo (_ 'No open utility found. Try installing "xdg-open" or "xdg-utils".') >&2