From 8475a3b97ea997285628efa5bfd425b4926c501f Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Wed, 11 Nov 2020 12:53:23 +0530 Subject: [PATCH] doc: update about a markdown rule in coding guide Update the coding guide about MD014, i.e. Dollar signs used before commands without showing output Signed-off-by: Prasanna Kumar Kalever --- docs/coding.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/coding.md b/docs/coding.md index 6453d896c..8d6f21e84 100644 --- a/docs/coding.md +++ b/docs/coding.md @@ -68,3 +68,26 @@ import ( or retry for it and/or is fully recoverable. * Use log level `ERROR` when something occurs which is fatal to the operation, but not to the service or application. + +### Mark Down Rules + +* MD014 - Dollar signs used before commands without showing output + + The dollar signs are unnecessary, it is easier to copy and paste and + less noisy if the dollar signs are omitted. Especially when the + command doesn't list the output, but if the command follows output + we can use '$ ' (dollar+space) mainly to differentiate between + command and its ouput. + + scenario 1: when command doesn't follow output + + ```console + cd ~/work + ``` + + scenario 2: when command follow output (use dollar+space) + + ```console + $ ls ~/work + file1 file2 dir1 dir2 ... + ```