Posix-Compatible Text Escaping [ Breaking Change ] - v0.8.0 #27
TekWizely
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bash-TPL
A Smart, Lightweight shell script templating engine, written in Bash.
Release - v0.8.0
Previously, Bash-TPL used bash's
printf -q "string"
technique to escape text strings. I was not aware that the$''
string-encoding is not posix and is not supported on many shells.User @0xEAB encountered a bug when trying to run scripts that contained escaped TABS within Dash:
After some research, I learned that the posix-compatible way to print strings with escape sequences is
%b
.Bash-TPL now utilizes a new encoding technique and uses
%b
to print text line strings.Full Changelog: v0.7.1...v0.8.0
Breaking Changes
Technically this is a breaking change as Bash-TPL now generates vastly different looking printf statements the previous versions.
Example of Changes
Below is an example of encoding outputs before / after this change:
tabs.tpl
output from v0.7.1
output from v0.8.0
No Negative Impact Expected
In practice, I don't expect there to be any negative impact from the change, but please do create an issue if something doesn't work for you.
This discussion was created from the release Posix-Compatible Text Escaping [ Breaking Change ] - v0.8.0.
Beta Was this translation helpful? Give feedback.
All reactions