nojhan/liquidprompt — pull request #164 by dolmen (2013-05-04 12:48:30+00:00)
Title: Optimize _lp_shorten_path by using bash/zsh features

Optimizations:
- move variable declaration in blocks where they will be used
(so they are not computed in blocks where they are not used)
- `local -i` for integer variables
- `if [[ $(( ... )) -gt $(( ... )) ]]` ==> `if (( ... > ... ))`
- `i=$((i+1))` ==> `let i++`

As a side effect the readability of the code is improved.