mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-18 05:10:41 +01:00
Functions are easier to spot with the optional 'function' keyword since curly braces can be used to create a list of commands to be executed in the current context.
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
|
|
||||||
Meaningful self documenting names should be used, if the variable name does not make it reasonably obvious as to the meaning, appropriate comments should be added.
|
Meaningful self documenting names should be used, if the variable name does not make it reasonably obvious as to the meaning, appropriate comments should be added.
|
||||||
@@ -14,13 +13,13 @@ Variables name should not clobber command names, such as `dir`, `pwd`
|
|||||||
|
|
||||||
Braces should be on the same line as the function name:
|
Braces should be on the same line as the function name:
|
||||||
|
|
||||||
helpful() {
|
function helpful() {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
Private or utility functions should be prefixed with an underscore:
|
Private or utility functions should be prefixed with an underscore:
|
||||||
|
|
||||||
_helper_util() {
|
function _helper_util() {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user