From 1a03c23b58441b0d18198ee6fb665a7d1a3413ed Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Wed, 10 Mar 2021 22:15:05 -0800 Subject: [PATCH] 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. --- share/functions/help.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/help.fish b/share/functions/help.fish index 71531babb..a3b805c30 100644 --- a/share/functions/help.fish +++ b/share/functions/help.fish @@ -94,7 +94,7 @@ function help --description 'Show help for the fish shell' if not set -q fish_browser[1] 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 end