Handle snippet without EOL

fix #3
This commit is contained in:
BarbUk 2020-05-08 20:45:41 +04:00
parent 539c487bf0
commit 88fd9418a3

2
snippy
View File

@ -83,7 +83,7 @@ bashdown() {
# Simplified version of bashdown, use echo and bash var search and replace
# Better handling of symbol char
bashdown_simple() {
while IFS= read -r line; do
while IFS= read -r line || [[ -n "$line" ]]; do
line="$(eval "echo \"${line//\"/\\\"}\"")"
echo "$line"
done