From a108e73ce3cff3500e106f172db011a66dcfa4a5 Mon Sep 17 00:00:00 2001 From: Agno94 Date: Mon, 29 Mar 2021 14:21:55 +0200 Subject: [PATCH] contributing-guides/style-guide: add block device rules (#5036) --- contributing-guides/style-guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contributing-guides/style-guide.md b/contributing-guides/style-guide.md index 820c14b8c..e14b36308 100644 --- a/contributing-guides/style-guide.md +++ b/contributing-guides/style-guide.md @@ -64,6 +64,8 @@ Keep the following guidelines in mind when choosing tokens: But in a command like `wc -l {{file}}`, using `{{file}}` (without extension) is sufficient. 7. If the example is clearer with an actual value rather than a generic placeholder, use the actual value. For example, use `iostat {{2}}` rather than `iostat {{interval_in_secs}}`. +8. If a command performs irreversible changes to a file system or to user's devices, then write every example in a way that they cannot be unmindfully copy-pasted by the user. + For example, instead of `ddrescue --force --no-scrape /dev/sda /dev/sdb` write `ddrescue --force --no-scrape {{/dev/sdX}} {{/dev/sdY}}` and use the `{{/dev/sdXY}}` placeholder for *block devices* instead of `/dev/sda1`. In general, tokens should make it as intuitive as possible to figure out how to use the command and fill it in with values.