From c64c22c878d84aa7403a545ef06a41d0dcd1910a Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Mon, 10 Mar 2025 05:38:05 +0200 Subject: [PATCH] style-guide: rework option syntax instructions (#15911) --- contributing-guides/style-guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contributing-guides/style-guide.md b/contributing-guides/style-guide.md index 70e0152e16..3038890f71 100644 --- a/contributing-guides/style-guide.md +++ b/contributing-guides/style-guide.md @@ -418,15 +418,15 @@ For example, `[d]ownload` in English may be translated into `[d]escargar` in Spa > [!NOTE]\ > In cases where the character isn't present in the translated word, you can highlight the option before/next to the equivalent word or you can add the English work beside the translation inside a bracket. -> For example, `E[x]tract` in English maybe translated into `[x] ekstrak` or `ekstrak [x]` or `ekstrak (E[x]tract)` in Indonesian. +> For example, `E[x]tract` in English may be translated into `ekstrak [x]` or `ekstrak (E[x]tract)` in Indonesian. ## Example commands ### Option syntax -- For commonly/frequently used commands (e.g. `grep`, `tar`, etc.), we prefer using short options along with [mnemonics](#short-option-mnemonics) or both inside a placeholder. +- For user-friendliness, prefer **GNU-style long options** (like `--help` rather than `-h`) when they are cross-platform compatible (intended to work the same across multiple platforms) for pages in the `common` directory. +- If a command only supports short options, attempt to document what the letter is short for with a [mnemonic](#short-option-mnemonics). - For letting the client decide whether to show long or short options in commands, use an option placeholder i.e. `{{[-o|--output]}}`. -- For user-friendliness, use **GNU-style long options** (like `--help` rather than `-h`) when they are cross-platform compatible (intended to work the same across multiple platforms) for pages in the `common` directory. - Prefer using a space instead of the equals sign (`=`) to separate options from their arguments (i.e. use `--opt arg` instead of `--opt=arg`), unless the program does not support it. - Likewise prefer separating shortform options from their arguments with a space (i.e. use `-o arg` instead of `-oarg`), unless the program does not support it.