mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Don't use xdg-open if running in terminal mode (i.e. no Xorg)
If the $DISPLAY environment variable is not set, xdg-open should not be used to load the web browser. Just because it is installed does not mean that the user exclusively runs in an X session. Needed for Lynx detection to work around #4170
This commit is contained in:
parent
c40188e40e
commit
2b425ad221
1 changed files with 3 additions and 2 deletions
|
@ -56,7 +56,8 @@ function help --description 'Show help for the fish shell'
|
|||
if type -q cygstart
|
||||
set fish_browser cygstart
|
||||
# If xdg-open is available, just use that
|
||||
else if type -q xdg-open
|
||||
# but only if an X session is running
|
||||
else if type -q xdg-open; and set -q -x DISPLAY
|
||||
set fish_browser xdg-open
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue