_lp_shorten_path: set value for locals on separate line (zsh)
zsh doesn't like if we set the value of a local while we declare it.
This commit is contained in:
parent
81c93c1d52
commit
964f77834e
@ -519,9 +519,11 @@ _lp_shorten_path()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local p="${PWD/#$HOME/~}"
|
local p
|
||||||
local -i len=${#p}
|
p="${PWD/#$HOME/~}"
|
||||||
local -i max_len=$((${COLUMNS:-80}*$LP_PATH_LENGTH/100))
|
local -i len max_len
|
||||||
|
len=${#p}
|
||||||
|
(( max_len = ${COLUMNS:-80} * $LP_PATH_LENGTH / 100 ))
|
||||||
|
|
||||||
if $_LP_SHELL_bash; then
|
if $_LP_SHELL_bash; then
|
||||||
if (( len > max_len ))
|
if (( len > max_len ))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user