1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 19:20:53 +02:00

43031: Add note to style guide about variant syntax

This commit is contained in:
dana 2018-06-16 11:49:20 -05:00
parent 92b0e885d6
commit 4d19645d49
2 changed files with 25 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2018-06-16 dana <dana@dana.is>
* 43031: Etc/completion-style-guide: Add note about optional/variant
syntax (cf. 43025)
2018-06-15 dana <dana@dana.is>
* 43024: Completion/Unix/Command/_man: Improve section-name matching

View file

@ -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