summaryrefslogtreecommitdiff
path: root/Etc/completion-style-guide
diff options
context:
space:
mode:
Diffstat (limited to 'Etc/completion-style-guide')
-rw-r--r--Etc/completion-style-guide20
1 files changed, 20 insertions, 0 deletions
diff --git a/Etc/completion-style-guide b/Etc/completion-style-guide
index a6fc737a7..ca99c828b 100644
--- a/Etc/completion-style-guide
+++ b/Etc/completion-style-guide
@@ -20,6 +20,26 @@ Coding style:
* Please try not to use lines longer than 79 characters. Don't worry
about breaking long `_arguments' or `_values' specs though.
+* Never use alternative, unusual, or optional syntax in completion
+ functions (or any other shell code distributed with zsh). In other
+ words, do NOT use the following:
+
+ # Short loops
+ for x in $y; myfunc $x
+
+ # Alternative forms
+ if { [[ $x == $y ]] } {
+ myfunc $x
+ }
+ foreach x in $y {
+ myfunc $x
+ }
+
+ # Weird tricks
+ () for 1 {
+ myfunc $1
+ } $x
+
Descriptions:
Descriptions should not have a trailing full stop and initial capital