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
> 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.
This was introduced as a workaround to #7215 - xdg-open's generic path
wouldn't background graphical apps.
This has been fixed a month ago in xdg-open, so we can stop doing it.
The good news is this also allows terminal apps to be used again, so
it
Fixes#10045
(cherry picked from commit f8e3881)
sh -c 'env HOME=$(mktemp -d) XDG_CONFIG_HOME= fish'
) and experienced the same behaviorExpected behavior
Current behavior
Furthermore, I tried copying the basic behavior of
open.fish
, and the following occurs:I see mention of a possible issue in the code comment here : https://github.com/fish-shell/fish-shell/blob/4ab34f2e86f91e90e732302446f1382cc122f07c/share/functions/open.fish#L33C48-L33C48 : could that be relevant?
The text was updated successfully, but these errors were encountered: