[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 6663709d7679cfbc770665dc01175ac65b6f5c6f

David Paleino dapal at debian.org
Tue Feb 2 18:48:44 UTC 2010


The following commit has been merged in the master branch:
commit 6663709d7679cfbc770665dc01175ac65b6f5c6f
Author: David Paleino <dapal at debian.org>
Date:   Tue Feb 2 19:02:26 2010 +0100

    docs: styleguide, establish line wrapping and $() instead of ``

diff --git a/doc/styleguide.txt b/doc/styleguide.txt
index 39aedf8..85e1fbb 100644
--- a/doc/styleguide.txt
+++ b/doc/styleguide.txt
@@ -37,22 +37,33 @@ be more efficient in some cases and may reduce need for nesting
 conditions, and it's cleaner to write for example [[ ... && ... ]]
 than [ ... ] && [ ... ], and in general [[ ]] has more features.
 
+Line wrapping
+-------------
+
+Try to wrap lines at 72 characters. Never go past this limit, unless
+you absolutely need to (example: a long sed regular expression, or the
+like). This also holds true for the documentation and the testsuite.
+Other files, like ChangeLog, or COPYING, are exempt from this rule.
+
+$(...) vs `...`
+---------------
+
+When you need to do some code substitution in your completion script,
+you *MUST* use the $(...) construct, rather than the `...`. The former
+is preferable because anyone, with any keyboard layout, is able to
+type it. Backticks aren't always available, without doing strange
+key combinations.
+
 /////////////////////////////////////////
 case/esac vs if
 ---------------
 
-line wrapping
--------------
-
 quoting
 -------
 
 awk vs cut for simple cases
 ---------------------------
 
-$(...) vs `...`
----------------
-
 variable and function naming
 ----------------------------
 

-- 
bash-completion



More information about the Bash-completion-commits mailing list