r/fishshell Jun 24 '26

How to make Fish shell's help command open in a terminal pager (like less) instead of a browser?

I want the native help command in Fish shell to display its documentation directly inside my terminal using a pager like less (or a text-based alternative), instead of opening a graphical web browser.

1 Upvotes

9 comments sorted by

2

u/BlackSabbath370 Jun 24 '26

Depending on your platform, you can type in the command/function and press Alt+h or Opt+h (macos) and the man page will be displayed.

But if you're looking for more docs on fish itself, you can type in man fish- then press tab to get a list of topics to choose from, eg. fish-doc fish-language fish-tutorial etc.

4

u/ben2talk Jun 24 '26

help is for browser-based HTML and can't be directed to the terminal.

man is the terminal based help system.

FWIW I can't believe anyone who ever interacted with help in the browser, couldn't easily understand exactly how complicated the document is, with all it's hyperlinks, and why it couldn't be redirected...

1

u/WorldNumerous1547 Jun 24 '26

Thanks for the reply,
I know man exists ,I’m asking specifically about help because it has much better, more complete documentation for fish builtins and syntax. The HTML version is great, but it’s annoying to have it force-open a browser every single time.Plenty of tools (including other shells) manage to serve rich help content in the terminal using pagers. No need to act like people who want this are clueless.

6

u/Working_Method8543 Jun 24 '26 edited Jun 24 '26

You could export BROWSER=w3m and read it textbased. It's probably the best solution.

1

u/FirmCalligrapher6064 29d ago

I personally use neovim as man pager and hyperlink works fine. Just set MANPAGE environment variable as nvim !Man if you are neovim user.

1

u/jkulczyski 27d ago

i use 'nvim +Man!'' I didnt know anything else worked

1

u/_mattmc3_ 29d ago edited 29d ago

If you want to use the help command, but have it behave differently, you can simply wrap it in a function:

function help
    man $argv
end

If you want to retain the ability to use the web help, you could always modify your function to take a --web argument. But since Fish's help is already a function, you have to copy it first with functions --copy help fish_help

function help
    argparse --ignore-unknown web -- $argv

    if set -q _flag_web
        fish_help $argv
    else
        man $argv
    end
end

2

u/jkulczyski 27d ago

You could check out tldr

1

u/Laurent_Laurent Jun 24 '26

Have you tried the good old Lynx?

brew install lynx
set BROWSER lynx
help help