grass
grass copied to clipboard
[Bug] r.info -e output line breaks not properly managed
Describe the bug With the -e flag, r.info removes line breaks in the comments / history and adds line continuation. As a result, history cannot be parsed.
To Reproduce Steps to reproduce the behavior:
# Copy elevation map
g.copy raster=elevation,elevation_hist
# Add two lines to history
r.support elevation_hist history=BREAK
r.support elevation_hist history=ME
# Print extended info in key-value form (no line breaks)
r.info -e elevation_hist
# Print history (with line breaks)
r.info -h elevation_hist
Expected behavior Result should be something like:
map=elevation_hist
(...)
comments="r.proj input="ned03arcsec" location="northcarolina_latlong" mapset="helena" output="elev_ned10m" method="cubic" resolution=10
BREAK
ME"
System description (please complete the following information):
version=7.9.dev date=2019 revision=f1f82d16b build_date=2019-12-03 build_platform=x86_64-pc-linux-gnu build_off_t_size=8 libgis_revision=00000 libgis_date="?" proj=5.2.0 gdal=2.3.2 geos=3.7.1 sqlite=3.26.0
Additional context See: e.g. https://github.com/OSGeo/grass/pull/476 https://www.mail-archive.com/[email protected]/msg59103.html