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.
parent
5ee61cef2f
commit
ccb7fd5c2b
@ -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() {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user