Open aureliojargas opened 5 years ago
Fixed by the new sedparse
parser, see #52.
$ cat bug.sed
i\
$ ./sedsed.py -f bug.sed
i\
$ ./sedsed.py -e 'i\'
i\
$
Mmmm, but that extra blank line in the output does not seem right.
Indeed, when running the debug, it is adding an extra blank line that it shouldn't:
$ seq 5 | sed -e '3i\'
1
2
3
4
5
$ seq 5 | ./sedsed.py -d -e '3i\' --hide=patt,hold,comm
1
2
3
4
5
$
When the i
command is not at EOF, it works as expected:
$ seq 5 | ./sedsed.py -d -e '3i\' -e foo --hide=patt,hold,comm
1
2
foo
3
4
5
$
It seems it is a bug in sedparse, see https://github.com/aureliojargas/sedparse/issues/2
The
i
command was ignored in both-e
and-f
.