Add a note for help thing to the missing doc error message

This should cover most cases - the user didn't install the docs and is
trying to view the man page via __fish_print_help, so we don't have a
way to show anything.

But `help thing` will fall back to the online version of the docs,
which should work if there's an internet connection.

See #7824.
This commit is contained in:
Fabian Homborg
2021-03-19 17:20:30 +01:00
parent 02699d1acc
commit d79f864072
4 changed files with 10 additions and 2 deletions

View File

@@ -114,27 +114,33 @@ echo comment after conjunction
# --help works
builtin and --help >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo $status
and --help >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo $status
# CHECK: 0
# CHECK: 0
builtin or --help >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo $status
or --help >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo $status
# CHECK: 0
# CHECK: 0
builtin not --help >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo $status
not --help >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo $status
# CHECK: 0
# CHECK: 0

View File

@@ -242,6 +242,8 @@ echo 7 $status # no passthrough
false
set -h >/dev/null
# CHECKERR: fish: Missing man page {{.*}}
# CHECKERR: `help '{{.*}}'` will open the online version.
echo 8 $status # no passthrough
#CHECK: 8 0
true