mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 18:38:00 +00:00
Ensure we use the same function definition syntax everywhere
This commit is contained in:
parent
75a60bc7bf
commit
a70bce3ea6
@ -30,7 +30,7 @@ there are a number of additional things to keep in mind.
|
|||||||
|
|
||||||
- Local variables should be used whenever possible.
|
- Local variables should be used whenever possible.
|
||||||
- Prefer `zstyle` over environment variables for configuration.
|
- Prefer `zstyle` over environment variables for configuration.
|
||||||
- Use the `my_func()` syntax for defining functions.
|
- Use the function keyword to define functions.
|
||||||
- The 80 character hard limit can be waved for readability.
|
- The 80 character hard limit can be waved for readability.
|
||||||
|
|
||||||
#### Using an Alternative zprezto Directory
|
#### Using an Alternative zprezto Directory
|
||||||
|
4
init.zsh
4
init.zsh
@ -20,7 +20,8 @@ unset min_zsh_version
|
|||||||
# zprezto convenience updater
|
# zprezto convenience updater
|
||||||
# The function is surrounded by ( ) instead of { } so it starts in a subshell
|
# The function is surrounded by ( ) instead of { } so it starts in a subshell
|
||||||
# and won't affect the environment of the calling shell
|
# and won't affect the environment of the calling shell
|
||||||
function zprezto-update () (
|
function zprezto-update {
|
||||||
|
(
|
||||||
function cannot-fast-forward {
|
function cannot-fast-forward {
|
||||||
local STATUS="$1"
|
local STATUS="$1"
|
||||||
[[ -n "${STATUS}" ]] && printf "%s\n" "${STATUS}"
|
[[ -n "${STATUS}" ]] && printf "%s\n" "${STATUS}"
|
||||||
@ -63,6 +64,7 @@ function zprezto-update () (
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
)
|
)
|
||||||
|
}
|
||||||
#
|
#
|
||||||
# Module Loader
|
# Module Loader
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user