Skip to content

Commit 48c7755

Browse files
authored
Improve turtle shell pattern stability under moving conditions (#69)
* Improve turtle shell pattern stability under moving conditions
1 parent 47b5314 commit 48c7755

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cromshell

+5-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,11 @@ function _turtleSpinner()
441441
local turtRFile=$( makeTemp )
442442
turtle &> ${tmpTurtFile}
443443
sed 's#^ ##g' ${tmpTurtFile} > ${turtFile}
444-
rev ${turtFile} | sed -e 's$/$#$g' -e 's#\\#/#g' -e 's$#$\\$g' -e 's#(#)#g' -e 's#)#(#g' > ${turtRFile}
444+
#Since we're switching pairs characters we need to do the switch in several steps
445+
#ex: /\ -> TMP\ -> TMP/ -> \/
446+
rev ${turtFile} | sed -e 's#/#TMP#g' -e 's#\\#/#g' -e 's#TMP#\\#g' \
447+
-e 's#(#TMP#g' -e 's#)#(#g' -e 's#TMP#)#g' \
448+
-e 's#>#TMP#g' -e 's#<#>#g' -e 's#TMP#<#g' > ${turtRFile}
445449

446450
# Set up some loop variables:
447451
local i=3

0 commit comments

Comments
 (0)