Check Xautority before trying to use X-based browser in help shellscript

darcs-hash:20051221135353-ac50b-9b8b37d7465d64a209e34ed047bd6e055a4fc179.gz
This commit is contained in:
axel 2005-12-21 23:53:53 +10:00
parent c216e36a72
commit 3a69fc997c

View file

@ -115,7 +115,7 @@ function help -d "Show help for the fish shell"
# If we are in a graphical environment, we check if there is a
# graphical browser to use instead.
if test (echo $DISPLAY)
if test (echo $DISPLAY) -a \( "$XAUTHORITY" = "$HOME/.Xauthority" -o "$XAUTHORITY" = "" \)
for i in $graphical_browsers
if which $i 2>/dev/null >/dev/null
set fish_browser $i