diff options
| author | Matt Hunter <m@lfurio.us> | 2026-06-01 03:14:27 -0400 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-06-01 03:14:27 -0400 |
| commit | 45f88d69871e1a9385f11c4162ea6cd84f04c6c0 (patch) | |
| tree | 03e9b106f171e1f17e0c9a8e4831fdda0b7caf9e /git-sonar.1 | |
| parent | 6915b76442b9a8c350922f4b8cf71075095ccf11 (diff) | |
| download | git-sonar-45f88d69871e1a9385f11c4162ea6cd84f04c6c0.tar.gz git-sonar-45f88d69871e1a9385f11c4162ea6cd84f04c6c0.zip | |
Fix bug with prepare_element rendering on bsd
Implementations of printf found in use by the default shells of OpenBSD
and FreeBSD interpret the escape characters found in the $SED_PRE and
$SED_POST constants differently than the implementations I've been
testing against on Linux and Windows.
In effect, the commands would noisily complain that each \* sequence
seen is an unsupported escape sequence. Of course, this string is
intended to be given to sed at the end of the script for the final
rendering of the prompt.
Address the issue by splitting up the big sed call at the end (with its
multiple -e arguments) and bringing it into the prepare_element
function. This effectively turns prepare_element into a text stream
manipulation function of its own, where each call to it will perform the
substitution of a single prompt element. Therefore, the oringinal
context simply needs to pipeline all calls to prepare_element together
to continue yielding the previous output - printf plumbing no longer
necessary.
Signed-off-by: Matt Hunter <m@lfurio.us>
Diffstat (limited to 'git-sonar.1')
0 files changed, 0 insertions, 0 deletions
