1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 10:29:25 +00:00

Prefer evaluation over test for arithmetic expression

Usage of `(( ... ))` over `[[ ... ]]` is preferred for arithmetic expression
since the former is less error prone.

Also, unset local variable whenever possible.
This commit is contained in:
Indrajit Raychaudhuri
2017-07-07 23:27:18 -05:00
committed by Kaleb Elwert
parent e3520b737f
commit 3f99519021
2 changed files with 4 additions and 2 deletions

View File

@ -32,12 +32,13 @@ unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
# cache time of 20 hours, so it should almost always regenerate the first time a
# shell is opened each day.
autoload -Uz compinit
compfiles=(${ZDOTDIR:-$HOME}/.zcompdump(Nm-20))
if [[ $#compfiles > 0 ]]; then
_comp_files=(${ZDOTDIR:-$HOME}/.zcompdump(Nm-20))
if (( $#_comp_files )); then
compinit -i -C
else
compinit -i
fi
unset _comp_files
#
# Styles