Closed ofsaleem closed 3 years ago
Can you confirm if the branch fix-50
works?
unfortunately same issue:
sed '1c\
nvimpager(1) "nvimpager v0.10.2-2-g3739cb8"' nvimpager.md | scdoc > nvimpager.1
sed: 1: "1cnvimpager(1) "nvimpag ...": command c expects \ followed by text
EDIT: also, in case its useful, i should note that in either branch, the file is generated, its just not complete. here are the contents:
~ cat nvimpager.1
.\" Generated by scdoc 1.11.1
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.nh
.ad l
.\" Begin generated content:
Did you copy paste that sed command from the makefile or did you run the makefile? It seems there is a tab character at beginning of the line, which is there in the makefile but will be removed by make.
I ran the makefile
Ok I tried another, hopefully more portable sed command. Strangely the CI on freebsd and osx did not complain about the sed command that I proposed above.
Can you try the new commit on the fix-50 branch?
that seems to have worked! nvimpager.1 is created fully and no errors that i can see. thank you so much
I has the one who wrote that line.
Apparently the POSIX sed needs to have \
after the c command. Like this:
$ sed '1c\nvimpager(1) "nvimpager v0.10.2-2-g56871b2"' nvimpager.md
But GNU sed (with GNU extensions) doesn't complain if you use it wrong.
In the future you can use the --posix
flag to see if the sed script works with POSIX.
$ sed --posix '1cnvimpager(1) "nvimpager v0.10.2-2-g56871b2"' nvimpager.md
sed: -e expression #1, char 3: expected \ after `a', `c' or `i'
This was in the man page but I didn't read it properly before.
@eNV25 no problem, I also used gnu make because I have it installed and only learned where it is not compatible with BSD when trying to run on mac & BSD on travis.
Thanks for the --posix
tip.
because macos uses BSD sed, sed behaves a little differently. so nvimpager installs and works just fine, but the manpage is not actually generated. if i try to manually create it with
make nvimpager.1
i can see the error:i fixed the issue by installing gnu-sed (
brew install gnu-sed
) and replacing the sed on that line with gsed. then it worked fine, and i canman nvimpager
properly.