From 8ff78eddf023d4c3574eafa77eab9d0a3bbf4967 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 7 Feb 2023 19:23:26 +0100 Subject: [PATCH] man: Reroute ".",":","[" to the proper names Fixes #9552 --- share/functions/man.fish | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/share/functions/man.fish b/share/functions/man.fish index 08c066668..ac1ec367f 100644 --- a/share/functions/man.fish +++ b/share/functions/man.fish @@ -36,5 +36,20 @@ function man --description "Format and display the on-line manual pages" set MANPATH $fish_manpath $MANPATH end + if test (count $argv) -eq 1 + # Some of these don't have their own page, + # and adding one would be awkward given that the filename + # isn't guaranteed to be allowed. + # So we override them with the good name. + switch $argv + case : + set argv true + case '[' + set argv test + case . + set argv source + end + end + command man $argv end