Improve error when help fails to find a browser

Previously, this message told the user to "set $BROWSER and try again". However,
when I first saw this error, I didn't know how I can set `BROWSER` in fish. Moreover,
I often see this error in situations when no browser will work. For instance, I might be
using fish over ssh, and I might either not know whether that system has a text-mode
browser installed or not want to use it.

A further improvement would be to report this message if a browser fails to start.
This commit is contained in:
Ilya Grigoriev 2021-03-10 22:15:05 -08:00 committed by Fabian Homborg
parent c23f311956
commit 1a03c23b58

View file

@ -94,7 +94,7 @@ function help --description 'Show help for the fish shell'
if not set -q fish_browser[1] if not set -q fish_browser[1]
printf (_ '%s: Could not find a web browser.\n') help printf (_ '%s: Could not find a web browser.\n') help
printf (_ 'Please set the variable $BROWSER or fish_help_browser and try again.\n\n') printf (_ 'Please try `BROWSER=some_browser help`, `man fish-doc`, or `man fish-tutorial`.\n\n')
return 1 return 1
end end