fixed newlines screwing with the viewer
This commit is contained in:
parent
e3eb2996f9
commit
d0f9ebf71c
|
@ -15,6 +15,11 @@ view_content(){
|
||||||
local -n _REF="${1}"
|
local -n _REF="${1}"
|
||||||
print_dashes; printf "\n"
|
print_dashes; printf "\n"
|
||||||
for i in "${!_REF[@]}"; do
|
for i in "${!_REF[@]}"; do
|
||||||
|
[ "${i}" == "text" ] && {
|
||||||
|
printf "[%s] \t=\t" "${i}"
|
||||||
|
sed ':a;N;$!ba;s/\n/\\n/g' <<< "${_REF[${i}]}"
|
||||||
|
continue
|
||||||
|
}
|
||||||
[ ! -z "${_REF[${i}]}" ] && printf "[%s] \t=\t%s\n" "${i}" "${_REF[${i}]}"
|
[ ! -z "${_REF[${i}]}" ] && printf "[%s] \t=\t%s\n" "${i}" "${_REF[${i}]}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue