Commit Graph

3 Commits

Author SHA1 Message Date
matze 3e67cdbf9b __ini_value: add space detection on insert
This detection tires to somehow inteligent places the new entry at the
end of the section, but tires to not infer with existing comments for
the section etc.

This detection is not perfect but will work in some cases. Hope it helps
(if someone whats to look at these files after they got edited).

This currently only applies to the `present` state, but not to the
`commented` state. This will be changed somehow when both scripts will
be unifed cause of there great similarities.
2021-03-06 22:09:59 +01:00
matze 10427fde84 __ini_value: implement multi-line buffer
This buffer gives the ability to look a bit longer into the past than
just a single line. This is helpfull to get a bigger context when
fiddling around comments. This also erases the need of
`lastlinepopulated` as there is something in the pipe or nothing.
2021-03-06 17:06:32 +01:00
matze 8c7a6906de __ini_value: starting base parts
Initial body of the __ini_value. It contains two awk-scripts: to detect
the state that is important to trigger a code generation, and to change
that line to the correct line. It might have problems which is not
matured enoght.

The most difficult points will be the comment detection, as this is a
critical point as you don't know if the user want to have this touched.
2021-03-05 20:38:19 +01:00