Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ccccmd opened this issue Dec 30, 2022 · 2 comments
Open

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

ccccmd opened this issue Dec 30, 2022 · 2 comments

Comments

@ccccmd
Copy link

ccccmd commented Dec 30, 2022

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.

@bptato
Copy link
Contributor

bptato commented Dec 31, 2022

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?

@ccccmd
Copy link
Author

ccccmd commented Dec 31, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants