tats/w3m

[Help document bug] For w3m, the help document misses some options

Opened this issue · 2 comments

The "--help" option of s2nd misses an option "graph", "no-graph", "halfdump", "halfload", "backend", "backend_batch", "ri", "sixel" for version 0.5.3.

For the option "graph", the following code appears during option parsing and modifies the UseGraphicChar in main.c:616 for version 0.5.3.

		UseGraphicChar = GRAPHIC_CHAR_DEC;

For the option "no-graph", the following code appears during option parsing and modifies the UseGraphicChar in main.c:618 for version 0.5.3.

		UseGraphicChar = GRAPHIC_CHAR_ASCII;

For the option "halfdump", the following code appears during option parsing and modifies the w3m_dump in main.c:667 for version 0.5.3.

		w3m_dump = DUMP_HALFDUMP;

For the option "halfload", the following code appears during option parsing and modifies the w3m_dump, w3m_halfload, DefaultType , default_type in main.c:669-671 for version 0.5.3.

		w3m_dump = 0;
		w3m_halfload = TRUE;
		DefaultType = default_type = "text/html";

For the option "backend", the following code appears during option parsing and modifies the w3m_backend in main.c:674 for version 0.5.3.

		w3m_backend = TRUE;

For the option "backend_batch", the following code appears during option parsing and modifies the w3m_backend, backend_batch_commands and calls the pushText in main.c:677-682 for version 0.5.3.

		w3m_backend = TRUE;
		if (++i >= argc)
		    usage();
		if (!backend_batch_commands)
		    backend_batch_commands = newTextList();
		pushText(backend_batch_commands, argv[i]);

For the option "ri", the following code appears during option parsing and modifies the enable_inline_image in main.c:717 for version 0.5.3.

		enable_inline_image = INLINE_IMG_OSC5379;

For the option "sixel", the following code appears during option parsing and modifies the enable_inline_image in main.c:720 for version 0.5.3.

		enable_inline_image = INLINE_IMG_SIXEL;

But it does not appear in the document provided by "--help".

It may prevent users from using the relevant function.

FWIW, I only left in "ri" and "sixel" for backwards compatibility. Better set the inline image method in the options panel (press `o'), or with the -o flag.

Also, while we're at it, right now the -help output is ~2 pages long, so you'd need a pager (or terminal scrollback) to even view all switches. I agree that they should be documented somewhere, but maybe those that can be set in the options page too could be moved to the man page only?

Help document or man page are both ok. I think maybe they should contains all options to make the user know all options.