You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Open fails when xdg-open would launch a terminal program #10045
> xdg-open ~/mydirectory
(lf opens)
> open ~/mydirectory
(nothing happens and I'm still at a fish prompt)
> open ~/myfile.txt
(nothing happens and I'm still at a fish prompt)
> xdg-open ~/myfile.txt
(hx opens)
Furthermore, I tried copying the basic behavior of open.fish, and the following occurs:
> function opentest
for i in $argv
xdg-open $i
end
end
> opentest somedir/
(lf is opened correctly)
The issue here is that we background the xdg-open - we use xdg-open $i &. This is a workaround for an issue where in some paths it'll do that itself and in others won't.
Fundamentally we can't detect that and have to pick one - either we work around that bug or we enable things running in the terminal.
Ideally that would be fixed in xdg-open, but it's been pretty unmaintained for years (and never was all that great tbqh). If it isn't I'm not sure if we want to reintroduce a bug for graphical applications, which xdg-open was always geared towards more, or if we want to allow terminal applications.
Or we could always drop the open function and let people deal with it themselves.
Activity
faho commentedon Oct 4, 2023
The issue here is that we background the
xdg-open- we usexdg-open $i &. This is a workaround for an issue where in some paths it'll do that itself and in others won't.Fundamentally we can't detect that and have to pick one - either we work around that bug or we enable things running in the terminal.
Ideally that would be fixed in xdg-open, but it's been pretty unmaintained for years (and never was all that great tbqh). If it isn't I'm not sure if we want to reintroduce a bug for graphical applications, which xdg-open was always geared towards more, or if we want to allow terminal applications.
Or we could always drop the
openfunction and let people deal with it themselves.faho commentedon Oct 4, 2023
Fixed in xdg-utils 1 month ago.
open: Don't run xdg-open in the background
open: Don't run xdg-open in the background