Bug 167830 - Make sure that command line examples are shown correctly depending on OS
Summary: Make sure that command line examples are shown correctly depending on OS
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HelpGaps-NewFeatures Help-Changes-Features
  Show dependency treegraph
 
Reported: 2025-08-06 08:46 UTC by Mike Kaganski
Modified: 2025-10-22 11:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2025-08-06 08:46:24 UTC
Ref: https://ask.libreoffice.org/t/cant-start-libreoffice-with-socket-settings/125164/2
Ref: https://ask.libreoffice.org/t/passing-in-json-parameters-into-writer-for-the-convert-to-option/88142
and many more.

Some examples in help quote command line parameters. That is system-dependent; Linux command line may accept single-qouted parameters, while on Windows, cmd.exe doesn't.

Of course, it's also shell-dependent; e.g., the syntax differs between cmd.exe ad powershell (and even between different powershell versions, sigh).

We need to make system variants; and also always explicitly mention, which shell that is.
Comment 1 Olivier Hallot 2025-10-21 22:31:43 UTC
We can distinguish between WIN, UNIX and MAC operating systems in the help, but beyond that, the type of shell is not implemented as selector in the Help. 

Besides, the many possible shells can be hard to document all of them.

We expect that command line users are savvy in shell use.

Suggest WONTFIX.

Feel free to reopen if you disagree.
Comment 2 Mike Kaganski 2025-10-22 04:32:10 UTC
(In reply to Olivier Hallot from comment #1)

I disagree.
As I wrote:

> We need to make system variants; and also always explicitly mention, which
> shell that is.

And *that* is definitely doable. We must *make system variants* - for most common shell on the platform; and we must *mention* the shell used in the example.
Comment 3 fpy 2025-10-22 06:53:06 UTC
documenting shell (or any exec wrapper) specifics seems beyong LO scope.
(maybe extended examples on wiki)

but having a warning/disclaimer about quotes makes definitely sense.
  

In https://help.libreoffice.org/latest/en-US/text/shared/guide/start_parameters.html
existing "warnings" could be made less "generic"

- ... The use of command line parameters is only recommended for experienced users.
- For normal handling, the use of command line parameters is not necessary. A few of the parameters require a deeper knowledge of the technical background of LibreOffice software technology.


This one even is sounds superfluous

- Starting LibreOffice Software From the Command Line
    Open a shell under Linux, *BSD, or macOS platforms. // Search for Run in the Windows Start menu
    Type the following line of text, then press Return:

This one should be a warning  (linked to -env: ) :
- LibreOffice requires write access to its user profile directory.

etc etc
Comment 4 Mike Kaganski 2025-10-22 07:24:20 UTC
(In reply to fpy from comment #3)
> documenting shell (or any exec wrapper) specifics seems beyong LO scope.

1. As long as we provide a command line example, documenting the environment where the example works *definitely is* in the scope of the help.

2. As long as there is a reasonable way to provide a useful example for a given OS, as opposed to useless bash example for Windows users, it **definitely is** in the scope of the help to provide a useful example.
Comment 5 fpy 2025-10-22 10:32:18 UTC
(In reply to Mike Kaganski from comment #4)
> documenting

almost agree, 
for the record, I make a distinction between /mentionning/ and /documenting/.

Q: are the double quotes of this example mandatory ? (on all OSes). Or optional or replaced by single quotes ?

  ... pdf:draw_pdf_Export:{"PageRange":{"type":"string","value":"2-"}}
Comment 6 Mike Kaganski 2025-10-22 10:52:48 UTC
(In reply to fpy from comment #5)
> almost agree, 
> for the record, I make a distinction between /mentionning/ and /documenting/.

Which makes no sense at all. As usual, nonsensical "disagreement" dilutes the original idea, and prevents useful implementation.

The examples are there. They are provided after testing in *some* environment (or that must be so; if not, it's a problem of the one who created the example). This is the final fact; and here, *mentioning* which environment (here: shell flavor) this example works in, is exactly the same as *documenting* this environment.

The original comment 0 already used the wording "explicitly mention, which shell that is". There was no mention that we need to differentiate the shown example based on the shell that user uses (even though that is *possible* - in a *different* way, similar to how many API documentations provide a variety of examples, sometimes as "tabbed" box with tabs representing different programming languages; nothing prevents us from providing a similar thing, with tabs for bash/csh/..., and for cmd/powershell/...) - but THAT WAS NOT the topic here, and comment 1 somehow assumed what was not here. Only OS-based differentiation was proposed, with the obvious "use example with the default / most-used / reasonable shell for the OS, and mention that shell".

> Q: are the double quotes of this example mandatory ? (on all OSes). Or
> optional or replaced by single quotes ?
> 
>   ... pdf:draw_pdf_Export:{"PageRange":{"type":"string","value":"2-"}}

Which is another off-topic here. Please don't hijack this. If you have a question, ask on Ask LibreOffice.
Comment 7 fpy 2025-10-22 11:05:26 UTC
oops. forgot your narrow minded and insulting signature.
fair enough.
Comment 8 fpy 2025-10-22 11:06:48 UTC
(In reply to Mike Kaganski from comment #6)
> If you have a question, ask on Ask LibreOffice.

be sure I won't :(