mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #217 from alecchen/master
remove "+=" operator in rbenv-rehash to support bash-3.0
This commit is contained in:
commit
6778c8e905
1 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ shim_variable_name() {
|
|||
if [[ ! "$shim" =~ [^[:alnum:]_-] ]]; then
|
||||
shim="${shim//_/_5f}"
|
||||
shim="${shim//-/_2d}"
|
||||
result+="$shim"
|
||||
result="$result$shim"
|
||||
else
|
||||
local length="${#shim}"
|
||||
local char i
|
||||
|
@ -93,9 +93,9 @@ shim_variable_name() {
|
|||
for ((i=0; i<length; i++)); do
|
||||
char="${shim:$i:1}"
|
||||
if [[ "$char" =~ [[:alnum:]] ]]; then
|
||||
result+="$char"
|
||||
result="$result$char"
|
||||
else
|
||||
result+="$(printf "_%02x" \'"$char")"
|
||||
result="$result$(printf "_%02x" \'"$char")"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue